Ejemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        num = (int)playerNo;
        //Debug.Log(num);
        cWeather   = GameObject.Find("backG").GetComponent <ChangeWeather>();
        charaNos   = Select.PlayerSelectChara();
        character1 = Instantiate(obj[charaNos[num - 1] - 1], this.transform.position, Quaternion.identity);
        character1.transform.parent = this.transform;

        //GetChild();
    }
Ejemplo 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>();
    }
Ejemplo n.º 3
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>();
    }