public override void FrameFeed()
        {
            if (characterInventory == null)
            {
                characterInventory = agent.RequestComponent <CharacterInventoryComponent>();
                throwTrajectory    = agent.RequestComponent <TrajectoryGizmo>();
                return;
            }

            if (characterInventory.HasItem(arrow))
            {
                if (InputConfig.Aim())
                {
                    Aim();
                }
                else if (InputConfig.ActionUp())
                {
                    ThrowArrow();
                    characterInventory.UseItem(arrow);
                }
                else
                {
                    ResetAim();
                }
            }
            else
            {
                ResetAim();
            }
        }
예제 #2
0
        public override void FrameFeed()
        {
            if (characterInventory == null)
            {
                characterInventory = agent.RequestComponent <CharacterInventoryComponent>();
                return;
            }

            ConsumableType smokeItem = ConsumableType.Bomb;

            if (InputConfig.SmokeBomb() && characterInventory.HasItem(smokeItem))
            {
                characterInventory.UseItem(smokeItem);
                Fire();
            }
        }