예제 #1
0
        public AudioClip AttackSound;      //played each time the unit attacks.

        void Awake()
        {
            CheckAttacker(); //check if the attacker setting matches the object where this component is at.

            AttackID = -1;   //reset the attack ID (the multiple attack, if existant will set it later in Start () )

            //Set the DoT source if we're ever going to use that:
            DoT.Source = gameObject;

            //Get the multiple attack manager:
            MultipleAttacksMgr = gameObject.GetComponent <MultipleAttacks>();

            InCoolDownMode = false;      //per default, not in cooldown mode
            IsActive       = true;       //per default, the attack type is active

            AttackFriendlyUnits = false; //don't attack friendly units per default
        }