Esempio n. 1
0
    // Start is called before the first frame update
    void Start()
    {
        p1Count = GameObject.Find("1PCount").GetComponent <CoinCountText>();
        p2Count = GameObject.Find("2PCount").GetComponent <CoinCountText>();
        p3Count = GameObject.Find("3PCount").GetComponent <CoinCountText>();
        p4Count = GameObject.Find("4PCount").GetComponent <CoinCountText>();



        finCoin = new int[4];
    }
Esempio n. 2
0
    void Start()
    {
        rb = GetComponent <Rigidbody2D>();

        _parent = transform.root.gameObject;
        pNum    = _parent.GetComponent <PlayerNoSelect>().num;

        cct     = GameObject.Find(pNum + "PCount").GetComponent <CoinCountText>();
        weather = GameObject.Find("backG").GetComponent <ChangeWeather>();
        hitflag = false;
        canJump = true;

        audioSource = GetComponent <AudioSource>();
    }
Esempio n. 3
0
 public void FindUITexts() //If, by any chance, the CoinCountTexts are null, find them.
 {
     if (!localCoinCountText)
     {
         localCoinCountText = GameObject.Find("CoinCountTxt").GetComponent <CoinCountText>();
     }
     if (!globalCoinCountText)
     {
         globalCoinCountText = GameObject.Find("TotalCoinCountTxt").GetComponent <CoinCountText>();
     }
     if (!scoreText)
     {
         scoreText = GameObject.Find("ScoreTxt").GetComponent <TextMeshProUGUI>();
     }
 }
Esempio n. 4
0
    // Start is called before the first frame update
    public virtual void Start()
    {
        _parent = transform.root.gameObject;
        pNum    = _parent.GetComponent <PlayerNoSelect>().num;

        weather = GameObject.Find("backG").GetComponent <ChangeWeather>();
        pCon    = this.GetComponent <PleyerController>();

        cct = GameObject.Find(pNum + "PCount").GetComponent <CoinCountText>();

        nowWeather = (int)weather.NowWeather();

        sig = GameObject.Find("Signal").GetComponent <Signal>();

        gamePlay = GameObject.Find("GamePlayScene").GetComponent <GamePlay>();
        //ChangeStatus();
        //powersprite = transform.GetChild(2).GetComponent<GameObject>();

        //audioSource = GetComponent<AudioSource>();
    }
Esempio n. 5
0
 void Start()
 {
     rb = GetComponent <Rigidbody2D>();
     //eventSystem1 = GameObject.Find("1PCount");
     cct = GameObject.Find((int)playerNo + "PCount").GetComponent <CoinCountText>();
 }