Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        Player         = GameObject.FindWithTag("Player");
        DinoAnimScript = GameObject.Find("DinoAnim").GetComponent <DinoAnimation>();

        spawnDino   = GameObject.Find("SpawnDino");
        setUpScript = spawnDino.GetComponent <DinoSpawn>();
    }
Пример #2
0
    // Start is called before the first frame update
    void Start()
    {
        spawnDino   = GameObject.Find("SpawnDino");
        setUpScript = spawnDino.GetComponent <DinoSpawn>();

        leftLabel  = GameObject.Find("left label");
        rightLabel = GameObject.Find("right label");
        if (setUpScript.switchInput)
        {
            leftLabel.GetComponent <SpriteRenderer>().sprite  = feed;
            rightLabel.GetComponent <SpriteRenderer>().sprite = hit;
        }
        else
        {
            leftLabel.GetComponent <SpriteRenderer>().sprite  = hit;
            rightLabel.GetComponent <SpriteRenderer>().sprite = feed;
        }
    }