protected override void OnStart()
        {
            base.OnStart();

            //Check if there is a BattleEntity behind the one eaten and if it can be hit by this move
            BattleEntity[] behindEntities = BattleManager.Instance.GetEntitiesBehind(EntitiesAffected[0]);
            behindEntities = BattleManager.Instance.FilterEntitiesByHeights(behindEntities, Action.MoveProperties.HeightsAffected);

            //Store the reference to the behind entity and tell it it's being targeted
            if (behindEntities.Length > 0)
            {
                BehindEntity = behindEntities[0];
                BehindEntity.TargetForMove(User);
            }
        }
Ejemplo n.º 2
0
        protected override void OnStart()
        {
            base.OnStart();

            //Check if there is a BattleEntity behind the one eaten and if it can be hit by this move
            List <BattleEntity> behindEntities = new List <BattleEntity>();

            User.BManager.GetEntitiesBehind(behindEntities, EntitiesAffected[0]);
            BattleManagerUtils.FilterEntitiesByHeights(behindEntities, Action.MoveProperties.HeightsAffected);

            //Store the reference to the behind entity and tell it it's being targeted
            if (behindEntities.Count > 0)
            {
                BehindEntity = behindEntities[0];
                BehindEntity.TargetForMove(User);
            }

            if (Action.CommandEnabled == true && Action.DrawActionCommandInfo == true)
            {
                GulpUI = new GulpActionCommandUI(actionCommand as GulpCommand);
                User.BManager.battleUIManager.AddUIElement(GulpUI);
            }
        }