示例#1
0
    // Start is called before the first frame update
    void Start()
    {
        robotSelectionManager = GameObject.FindWithTag("RobotSelectionManager").GetComponent <RobotSelectionManager>();
        craftingManager       = GameObject.FindWithTag("CraftingManager").GetComponent <CraftingManager>();
        //robotIndex = int.Parse(Regex.Replace(this.gameObject.name, "[^0-9]", ""));

        if (craftingManager.HasBeenDiscovered[robotIndex])
        {
            GetComponent <Image>().color = Color.white;
        }
        else
        {
            GetComponent <Image>().color = Color.black;
        }
    }
示例#2
0
 // Start is called before the first frame update
 void Start()
 {
     robotSelectionManager = GameObject.FindWithTag("RobotSelectionManager").GetComponent <RobotSelectionManager>();
 }