private void Awake()
 {
     instance      = this;
     gm            = FindObjectOfType <TD_GameManager>();
     startPosition = transform.position;
     gm.setResetableObjects(this.gameObject);
 }
        public override void Init()
        {
            TD_GameManager gm = FindObjectOfType <TD_GameManager>();

            gm.setResetableObjects(this.gameObject);
            ally = FindObjectOfType <TD_Ally>();
            GameObject door = GameObject.FindGameObjectWithTag("door");

            door.GetComponent <TD_PointZone>().tm = this.team;
            base.Init();
        }
Esempio n. 3
0
        //ゴールラインを探す
        void FindDoor()
        {
            TD_GameManager man = FindObjectOfType <TD_GameManager>();

            man.setResetableObjects(this.gameObject);
            if (team != man.playerA.t)
            {
                enemyDoor = man.playerA.door;
            }
            else
            {
                enemyDoor = man.playerB.door;
            }
        }
Esempio n. 4
0
        //エネミーゴールラインを見付ける、イベントを設定する
        void lateInit()
        {
            TD_GameManager gm = FindObjectOfType <TD_GameManager>();

            gm.setResetableObjects(this.gameObject);
            if (gm.playerA.t != team)
            {
                door = gm.playerA.door;
            }
            else
            {
                door = gm.playerB.door;
            }

            doorPos = new Vector3(door.transform.position.x, transform.position.y, door.transform.position.z);
            pancakeball.onTakingBall += reciveTarget;
            base.Init();
        }