マイロボット配置システム2








設置できる数を表示
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// 追加
using UnityEngine.UI;
public class MyBotSet : MonoBehaviour
{
private int setCount;
private Text countLabel;
private int getGPpoint;
private GPManager gpm;
public int price;
void Start()
{
setCount = 0;
countLabel = GetComponent<Text>();
countLabel.text = "× " + setCount.ToString("D3");
gpm = GameObject.Find("GPLabel").GetComponent<GPManager>();
}
void Update()
{
getGPpoint = gpm.gpPoint;
// 配置できるマイロボットの数・・・>「獲得したGPポイント ÷ マイロボットの価格」
setCount = getGPpoint / price;
countLabel.text = "×" + setCount.ToString("D3");
}
}









設置できる数を表示
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// 追加
using UnityEngine.UI;
public class MyBotSet : MonoBehaviour
{
private int setCount;
private Text countLabel;
private int getGPpoint;
private GPManager gpm;
public int price;
void Start()
{
setCount = 0;
countLabel = GetComponent<Text>();
countLabel.text = "× " + setCount.ToString("D3");
gpm = GameObject.Find("GPLabel").GetComponent<GPManager>();
}
void Update()
{
getGPpoint = gpm.gpPoint;
// 配置できるマイロボットの数・・・>「獲得したGPポイント ÷ マイロボットの価格」
setCount = getGPpoint / price;
countLabel.text = "×" + setCount.ToString("D3");
}
}

マイロボット配置システム2