public override void InitAction()
 {
     WorldEffects.SetWSProperty(E_PropKey.KillTarget, true);
     WorldPreconditions.SetWSProperty(E_PropKey.WeaponLoaded, true);
     Cost       = 5;
     Precedence = 30;
 }
Exemple #2
0
 public override void InitAction()
 {
     WorldEffects.SetWSProperty(E_PropKey.E_WEAPON_IN_HANDS, true);
     Cost          = 1;
     Interruptible = false;
     Precedence    = 90;
 }
Exemple #3
0
 public override void InitAction()
 {
     Debug.Log("InitAction");
     WorldEffects.SetWSProperty(E_PropKey.E_AT_TARGET_POS, true);
     Cost       = 5;
     Precedence = 70;
 }
Exemple #4
0
 public override void InitAction()
 {
     WorldPreconditions.SetWSProperty(E_PropKey.E_WEAPON_IN_HANDS, true);
     WorldEffects.SetWSProperty(E_PropKey.E_IN_COMBAT_RANGE, true);
     WorldEffects.SetWSProperty(E_PropKey.E_AT_TARGET_POS, true);
     Cost = 3;
 }
    public override void InitAction()
    {
        WorldEffects.SetWSProperty(E_PropKey.UseGadget, false);
        Interruptible = false;

        Cost = 2;
    }
Exemple #6
0
 public override void InitAction()
 {
     WorldEffects.SetWSProperty(E_PropKey.E_TELEPORT, false);
     Cost          = 1;
     Interruptible = false;
     Precedence    = 90;
 }
 public override void InitAction()
 {
     WorldPreconditions.SetWSProperty(E_PropKey.E_WEAPON_IN_HANDS, true);
     //   WorldPreconditions.SetWSProperty(E_PropKey.E_IN_COMBAT_RANGE, true);
     WorldEffects.SetWSProperty(E_PropKey.MoveToLeft, true);
     Cost = 2;
 }
 public override void InitAction()
 {
     WorldEffects.SetWSProperty(E_PropKey.CoverState, E_CoverState.None);
     Cost          = 1;
     Precedence    = 10;
     Interruptible = false;
 }
Exemple #9
0
    public override void InitAction()
    {
        WorldEffects.SetWSProperty(E_PropKey.E_IN_WEAPONS_RANGE, true);

        Cost       = 2;
        Precedence = 80;
    }
Exemple #10
0
    public override void InitAction()
    {
        WorldEffects.SetWSProperty(E_PropKey.KillTarget, true);
        Interruptible = true;

        Cost = 2;
    }
Exemple #11
0
        public override void Update(GameTime gameTime)
        {
            if (!escapeMenu.IsOpened)
            {
                Player.Update(gameTime);
                Camera.Update(Player.CanMove ? Player.Position : Player.AstralPosition);
                if (Player.Life <= 0)
                {
                    MainGame.GetInstance().SetScreen(new GameOverScreen());
                }

                foreach (Monster entity in Entities.OfType <Monster>())
                {
                    entity.Update(gameTime, Player);
                }

                while (deletedEntities.Count > 0)
                {
                    Entities.Remove(deletedEntities[0]);
                    deletedEntities.RemoveAt(0);
                }

                foreach (WorldEffect worldEffect in WorldEffects)
                {
                    worldEffect.Update(gameTime);
                }

                List <WorldEffect> deletedEffects = new List <WorldEffect>();

                foreach (WorldEffect worldEffect in WorldEffects)
                {
                    if (worldEffect.LifeSpan <= 0)
                    {
                        deletedEffects.Add(worldEffect);
                    }
                }

                while (deletedEffects.Count > 0)
                {
                    WorldEffects.Remove(deletedEffects[0]);
                    deletedEffects.RemoveAt(0);
                }
                Spawn(gameTime);
            }

            foreach (Window win in Windows.ToArray())
            {
                win.Update(gameTime);
            }

            if (KeyboardManager.IsPressed(Keys.F1))
            {
                isShown = !isShown;
            }
            if (KeyboardManager.IsPressed(KeyboardManager.BindedKeys[(int)KeyboardManager.KeysEnum.Escape]))
            {
                ToggleWindow(escapeMenu);
            }
        }
Exemple #12
0
    public override void InitAction()
    {
        WorldEffects.SetWSProperty(E_PropKey.E_ATTACK_TARGET, false);

        Precedence    = 80;
        Interruptible = false;
        Cost          = 2;
    }
Exemple #13
0
    public override void InitAction()
    {
        WorldEffects.SetWSProperty(E_PropKey.E_IDLING, false);

        Interruptible = false;

        Cost = 1;
    }
    public override void InitAction()
    {
        WorldPreconditions.SetWSProperty(E_PropKey.E_IN_WEAPONS_RANGE, true);
        WorldPreconditions.SetWSProperty(E_PropKey.E_WEAPON_IN_HANDS, true);
        WorldEffects.SetWSProperty(E_PropKey.E_ATTACK_TARGET, true);

        Cost = 4;
    }
    public override void Activate()
    {
        base.Activate();

        WorldEffects.SetWSProperty(E_PropKey.E_IN_DODGE, true);

        ActionRollTo();
    }
Exemple #16
0
    public override void InitAction()
    {
        WorldPreconditions.SetWSProperty(E_PropKey.E_WEAPON_IN_HANDS, true);
        WorldEffects.SetWSProperty(E_PropKey.E_ATTACK_TARGET, false);

        Precedence    = 80;
        Interruptible = false;
        Cost          = 1;
    }
Exemple #17
0
    public override void InitAction()
    {
        WorldEffects.SetWSProperty(E_PropKey.WeaponLoaded, true);

        Interruptible = false;

        Cost       = 1;
        Precedence = 10;
    }
Exemple #18
0
    public override void InitAction()
    {
        WorldEffects.SetWSProperty(E_PropKey.E_EVENT, E_EventTypes.None);

        Interruptible = false;

        Cost       = 1;
        Precedence = 100;
    }
Exemple #19
0
        public override void Update(GameTime gameTime)
        {
            if (!escapeMenu.IsOpened)
            {
                Player.Update(gameTime);

                foreach (Monster entity in Entities.OfType <Monster>())
                {
                    entity.Update(gameTime, MapFirst.Data, Player);
                }

                while (deletedEntities.Count > 0)
                {
                    Entities.Remove(deletedEntities[0]);
                    deletedEntities.RemoveAt(0);
                }

                foreach (WorldEffect worldEffect in WorldEffects)
                {
                    worldEffect.Update(gameTime);
                }

                List <WorldEffect> deletedEffects = new List <WorldEffect>();

                foreach (WorldEffect worldEffect in WorldEffects)
                {
                    if (worldEffect.LifeSpan <= 0)
                    {
                        deletedEffects.Add(worldEffect);
                    }
                }

                while (deletedEffects.Count > 0)
                {
                    WorldEffects.Remove(deletedEffects[0]);
                    deletedEffects.RemoveAt(0);
                }

                camera.Update(Player.CanMove ? Player.Position : Player.AstralPosition);
                Spawn(gameTime);
            }

            foreach (Window win in Windows.ToArray())
            {
                win.Update(gameTime);
            }

            if (KeyboardManager.IsPressed(Keys.F1))
            {
                isShown = !isShown;
            }
            if (KeyboardManager.IsPressed(Keys.Escape))
            {
                ToggleWindow(escapeMenu);
            }
        }
Exemple #20
0
    public override void InitAction()
    {
        Query           = new Fact(Fact.E_FactType.E_EVENT);
        Query.EventType = E_EventTypes.EnemyLost;

        //  WorldPreconditions.SetWSProperty(E_PropKey.E_WEAPON_IN_HANDS, true);
        WorldEffects.SetWSProperty(E_PropKey.E_LOOKING_AT_TARGET, true);
        Cost       = 1;
        Precedence = 95;
    }
Exemple #21
0
    public override void InitAction()
    {
        WorldPreconditions.SetWSProperty(E_PropKey.AtTargetPos, true);
        //WorldPreconditions.SetWSProperty(E_PropKey.WeaponInHands, false);
        WorldEffects.SetWSProperty(E_PropKey.UseWorldObject, false);

        Interruptible = false;

        Cost = 2;
    }
Exemple #22
0
    public override void InitAction()
    {
        WorldPreconditions.SetWSProperty(E_PropKey.E_AT_TARGET_POS, true);
        WorldPreconditions.SetWSProperty(E_PropKey.E_WEAPON_IN_HANDS, false);
        WorldEffects.SetWSProperty(E_PropKey.E_USE_WORLD_OBJECT, false);

        Interruptible = false;

        Cost = 2;
    }
    public override void InitAction()
    {
        WorldEffects.SetWSProperty(E_PropKey.CoverState, E_CoverState.Middle);
        WorldPreconditions.SetWSProperty(E_PropKey.AtTargetPos, true);

        Interruptible = false;

        Cost       = 1;
        Precedence = 60;
    }
    public override void InitAction()
    {
        WorldPreconditions.SetWSProperty(E_PropKey.E_IN_WEAPONS_RANGE, true);
        WorldPreconditions.SetWSProperty(E_PropKey.E_WEAPON_IN_HANDS, true);
        WorldPreconditions.SetWSProperty(E_PropKey.E_LOOKING_AT_TARGET, true);
        WorldEffects.SetWSProperty(E_PropKey.E_ATTACK_TARGET, false);

        Interruptible = false;

        Cost = 2;
    }
Exemple #25
0
    public override void InitAction()
    {
        //WorldEffects.SetWSProperty(E_PropKey.E_IN_DODGE, true);
        WorldEffects.SetWSProperty(E_PropKey.E_IN_BLOCK, true);
        Cost          = 2;
        Interruptible = true;

        Precedence = 100;

        // Query = FactsFactory.Create(Fact.E_FactType.E_EVENT);
        //Query.EventType = E_EventTypes.E_SOMEBODY_IS_ATTACKING_ME;
    }
Exemple #26
0
    public override void InitAction()
    {
        WorldEffects.SetWSProperty(E_PropKey.E_EVENT, E_EventTypes.None);

        Interruptible = false;

        Cost       = 1;
        Precedence = 100;

        Query           = FactsFactory.Create(Fact.E_FactType.E_EVENT);
        Query.EventType = E_EventTypes.Hit;
    }
Exemple #27
0
 public override void Update()
 {
     if (WorldEffects.GetWSProperty(E_PropKey.E_AT_TARGET_POS).GetBool() == true)
     {
         Action          = AgentActionFactory.Create(AgentActionFactory.E_Type.E_Move) as AgentActionMove;
         Action.MoveType = AgentActionMove.E_MoveType.E_MT_Forward;
         Owner.BlackBoard.AddAction(Action);
     }
     else
     {
         AgentActionIdle a = AgentActionFactory.Create(AgentActionFactory.E_Type.E_Idle) as AgentActionIdle;
         Owner.BlackBoard.AddAction(a);
     }
 }
Exemple #28
0
 public override void Update()
 {
     if (WorldEffects.GetWSProperty(E_PropKey.E_AT_TARGET_POS).GetBool() == true)
     {
         Action          = AgentActionFactory.Create(AgentActionFactory.E_Type.E_MOVE) as AgentActionMove;
         Action.MoveType = AgentActionMove.E_MoveType.E_MT_FORWARD;
         Owner.BlackBoard.AddAction(Action);
     }
     else
     {
         //  Debug.Log("CreateOrderStop");
         AgentActionIdle a = AgentActionFactory.Create(AgentActionFactory.E_Type.E_IDLE) as AgentActionIdle;
         Owner.BlackBoard.AddAction(a);
     }
 }
Exemple #29
0
 public override void InitAction()
 {
     WorldEffects.SetWSProperty(E_PropKey.E_AT_TARGET_POS, true);
     Cost       = 5;
     Precedence = 30;
 }
Exemple #30
0
 public override void InitAction()
 {
     WorldEffects.SetWSProperty(E_PropKey.InDodge, false);
     Cost       = 5;
     Precedence = 70;
 }