// Use this for initialization
 void Start()
 {
     changeAttack   = false;
     attackCount    = 1;
     currentAttack  = charge;
     charge         = gameObject.GetComponent <TankChargeAttack>();
     fire           = gameObject.GetComponent <FireGoat>();
     backOff        = gameObject.GetComponent <BackOff>();
     playerLocation = GameObject.Find("Player");
 }
示例#2
0
        // Use this for initialization
        void Start()
        {
            changeAttack  = false;
            attackCount   = 1;
            currentAttack = charge;
            charge        = gameObject.GetComponent <TankChargeAttack>();
            //cannon = gameObject.GetComponent<TankDoubleCannon>();
            moveTowards = gameObject.GetComponent <BasicAI>();
            backOff     = gameObject.GetComponent <BackOff>();

            playerLocation = GameObject.Find("Player");
        }