6
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

クソアプリAdvent Calendar 2023

Day 6

お金が欲しい!ビッグになりたい!

Last updated at Posted at 2023-12-05

この記事はクソアプリ Advent Calendar 20236日目です。

欲望の塊

お金が欲しい。ビッグになりたい。
そんな、誰もが一度は夢見てそうな願望をかなえました。

完成形

どうでしょう。
金がいっぱいになりました。
ついでに、ビッグな人になれました。

作り方

使ったもの
Unity 2023.1.18f1
コード

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

using TMPro;
public class TextInput : MonoBehaviour
{
    public TMP_InputField inputField;
    [SerializeField] private string A;
    public TMP_Text Name;
    // Start is called before the first frame update
    void Start()
    {
      
        
    }

    // Update is called once per frame
    void Update()
    {
        Name.text = A;
        A = inputField.text;
    }
   
}
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;

public class BtnPush : MonoBehaviour
{
    public GameObject StartBtn;
    public GameObject InputField;
    public GameObject Money;
    public GameObject Okane;
    public GameObject BIG;
    public Transform MoneyTransform;
    // Start is called before the first frame update
    void Start()
    {
        Okane.SetActive(false);
        BIG.SetActive(false);

    }
  
    public void StartBtnClick()
    {
        InputField.SetActive(false);
        StartBtn.SetActive(false);
        Okane.SetActive(true);
        BIG.SetActive(true);
    }
    public void OkaneClick()
    {
        Instantiate(Money, new Vector3(0, 20.5f, 0),Quaternion.identity,MoneyTransform);
        
    }
    public void BIGClick()
    {
        this.gameObject.transform.localScale = new Vector3(this.transform.localScale.x + 0.1f, this.transform.localScale.y+0.1f, 1);
    }
}

まとめ

願いが叶いました。やったね。
せっかくなのでパソコンで遊べるようにしておきました
下のリンクからどうぞ
(ただしWindowsに限る,Macで動くかは知らない)

不具合があったら、やる気がでた時に直します。

6
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?