public PlayerAction(string actionName, float coolDown)
 {
     CoolDown = coolDown;
     ReadyToAct = true;
     Timer = new Timer(actionName);
     Timer.MillisecondsUntilExpire = CoolDown;
 }
        public Checkpoint_GUI(Vector2 position)
        {
            displayTimer = new Timer();
            displayTimer.MillisecondsUntilExpire = 2000;

            Initialize(position);
        }
        /// <summary>
        /// Initializes the component when the scene object is created/registered.
        /// </summary>
        /// <param name="owner">The scene object that is created.</param>
        /// <returns>False if the registration failed, true otherwise.</returns>
        protected override bool _OnRegister(TorqueObject owner)
        {
            if (!base._OnRegister(owner))
                return false;

            meleeTimer = new Timer("gruntMeleeTimer");
            meleeTimer.MillisecondsUntilExpire = coolDown;

            //animations = new Animations();

            return true;
        }
        protected override bool _OnRegister(TorqueObject owner)
        {
            if (!base._OnRegister(owner))
                return false;

            attackTimer = new Timer("spitterAttackTimer");
            attackTimer.MillisecondsUntilExpire = coolDown;

            if (weakSpotTemplate != null)
            {
                weakSpotObject = weakSpotTemplate.Clone() as T2DSceneObject;
                foreach (T2DCollisionImage image in weakSpotObject.Collision.Images)
                    SceneObject.Collision.InstallImage(image);
            }

            T2DSceneObject weapon = weaponTemplate.Clone() as T2DSceneObject;
            TorqueObjectDatabase.Instance.Register(weapon);

            if (weapon != null)
            {
                weapon.Mount(SceneObject, weaponLinkPoint, true);
                weaponComponent = weapon.Components.FindComponent<WeaponComponent>();
            }

            justShot = false;

            return true;
        }
        protected override bool _OnRegister(TorqueObject owner)
        {
            if (!base._OnRegister(owner))
                return false;

            coolDownTimer = new Timer();
            idleTimer = new Timer();
            coolDownTimer.MillisecondsUntilExpire = actionCoolDown;
            idleTimer.MillisecondsUntilExpire = 2000;
            launchFrame = 0;
            launched = false;
            onLeft = false;
            reachedBoundary = true;

            if (kushWeapon != null)
                kushWeaponComponent = kushWeapon.Components.FindComponent<WeaponComponent>();
            else
                ; //Log Error and shit

            if (vineWeapon != null)
                vineWeaponComponent = vineWeapon.Components.FindComponent<WeaponComponent>();
            else
                ; //Again, log some errorz

            ((LuaAIController)Controller).Init(this);

            return true;
        }
 ///<summary>
 /// Remove a timer.
 ///</summary>
 ///<param name="timer"></param>
 public void Remove(Timer timer)
 {
     _removeList.Add(timer);
 }
 ///<summary>
 /// Add a timer.
 ///</summary>
 ///<param name="timer"></param>
 public void Add(Timer timer)
 {
     _timerList.Add(timer);
 }
        protected override bool _OnRegister(TorqueObject owner)
        {
            if (!base._OnRegister(owner))
                return false;

            attackTimer = new Timer("hulkAttackTimer");

            attackTimer.MillisecondsUntilExpire = meleeCoolDown;

            if(meleeRotationController != null)
                meleeComponent = meleeRotationController.Components.FindComponent<SwipeAttackComponent>();

            if (shoulderCannonObject != null)
                shoulderCannon = shoulderCannonObject.Components.FindComponent<WeaponComponent>();

            //SceneObject.Collision.CollidesWith -= ExtPlatformerData.MeleeDamageObjectType;

            return true;
        }
 public BomberActorComponent()
 {
     explosionTimer = new Timer();
 }
        protected override bool _OnRegister(TorqueObject owner)
        {
            if (!base._OnRegister(owner) || !(owner is T2DSceneObject))
                return false;

            // tell the process list to notifiy us with ProcessTick and InterpolateTick events
            ProcessList.Instance.AddTickCallback(Owner, this);

            SceneObject.SetObjectType(ExtPlatformerData.ProjectileObjectType, true);

            SceneObject.Collision.CollidesWith = PlatformerData.PlayerObjectType;

            deathTimer = new Timer("projectile");
            deathTimer.MillisecondsUntilExpire = mSecondsToLive;

            deathTimer.Start();

            return true;
        }