Ejemplo n.º 1
0
        private bool _hitSomething = false; //!indicates if we have hit a player or not



        //! Use this for initialization
        void Start()
        {
            Trajectory = Path;
            LifeTimer  = new X8Timer(LifeLimit);
            LifeTimer.TurnTimerOn();


            //get the timer that is attached to this object
        }
Ejemplo n.º 2
0
 /*! Constructor for the charger that takes a charge time and intializes the private variables
  * \param ChargeTime is the time that the charger will take to fully charge
  *  */
 public RaydraCharger(float ChargeTime)
 {
     if (ChargeTime < 1f)
     {
         ChargeTime = 1f;
     }
     ChargeTimer = new X8Timer(ChargeTime);
     ChargeTimer.TimeLimitReached = FullyCharged;     //call is medthod whenever the timer has reached its limit
     IsCharged = false;
 }
Ejemplo n.º 3
0
        // Use this for initialization
        void Start()
        {
            ShootTimer = new X8Timer(1f);
            Bolts      = new List <RaydraProjectile>();

            for (int i = 0; i < Bolts.Count; ++i)
            {
                Bolts[i] = null; //initialize the array elements to null
            }
            Center = GameObject.Find("GoalCenter");

            ShootTimer.TimeLimitReached = TimerLimitReached;
        }
Ejemplo n.º 4
0
        Animator X8Animator;               //the animator that is attached to this object


        void Start()
        {
            Bolts = new List <RaydraProjectile>();

            for (int i = 0; i < Bolts.Count; ++i)
            {
                Bolts[i] = null; //initialize the array elements to null
            }



            X8Animator  = this.GetComponentInParent <Animator>();
            ChargeTimer = new X8Timer(1f);

            //assign a medthod to be called once the time limit is reached
            //TimeLimitReached is a delegate
            ChargeTimer.TimeLimitReached = WeaponIsCharged;

            //set the initial weapon charge
            WeaponCharged = false;
            X8Animator.SetBool("Shoot", false);
        }