Exemple #1
0
 public ShootBobberyBombBattleEvent(BobberyBomb bomb, Vector2 velocity, float gravity, float groundY)
 {
     bobberyBomb  = bomb;
     InitVelocity = velocity;
     Gravity      = gravity;
     GroundY      = groundY;
 }
 public DetonateBobberyBombBattleEvent(BobberyBomb bobberyBomb, DamageData damageInfo, Rectangle explosionArea,
                                       params HeightStates[] heightStates)
 {
     Bomb                 = bobberyBomb;
     DamageInfo           = damageInfo;
     AffectedHeightStates = heightStates;
     ExplosionArea        = explosionArea;
 }
        protected override void OnEnd()
        {
            base.OnEnd();

            //The bomb dies after exploding
            if (Bomb.IsDead == false)
            {
                Bomb.Die();
            }

            Bomb = null;
            AffectedHeightStates = null;
            ElapsedTime          = 0d;
        }
Exemple #4
0
        protected override void OnEnd()
        {
            base.OnEnd();

            //Initialize the bomb
            bobberyBomb.InitializeBomb();

            //Reset values and clear reference
            bobberyBomb  = null;
            CurVelocity  = Vector2.Zero;
            InitVelocity = Vector2.Zero;
            Gravity      = 0f;
            GroundY      = 0f;
        }