Search Results for

    Show / Hide Table of Contents

    Namespace TinnyStudios.AIUtility.Impl.Examples.FarmerHero

    Classes

    AddActionExample

    This class just shows an example of how you can add actions at runtime.

    BuySwordAction

    Buys the sword. In this case, sets Inventory.HasWeapon to true.

    BuySwordConsideration

    Consider if there is a monster then you would want to buy a sword. This is a very concrete implementation, you could reuse HasMonsterConsideration

    EatAction

    Sets hunger to 0 when performed.

    EntityBase

    The base class for all entities / living things.

    ExampleDataContext

    An example implementation of IAgentDataContext concretely defining the game data for the farmer hero. This is accessed by all actions and consideration. You do not need to do it this way if your game has a different way of injecting dependencies.

    GiveSwordAction

    This action gives a sword to another agent.

    HasMonsterConsideration

    Considers if there are any monsters around.

    HasWeaponConsideration

    Considers if the agent has a weapon already or not.

    HasWorkConsideration

    Consider if there are any trees remaining.

    HungerConsideration

    Consider if you a hungry.

    Inventory

    A very simple implementation of an inventory for the example.

    ManagerObject<TManager>

    The generic object of TManager. This allows you to create a TreeManager for Trees.

    MoneyConsideration

    Monster

    Unlike a TreeObject, Monster wants to be an entity base as well so here we use the IManagerObject interface instead. This will need to handle the binding process by itself which is just about keeping track of the monster manager..

    MonsterManager

    In this example, the monster manager instantiate 1 every 10s

    ObjectManager<T, TManager>

    The generic manager for a ManagerObject<TManager> This add a way to create a TreeManager of TreeObjects.

    SleepAction

    When performed, sets Sleepiness to 0.

    SleepinessConsideration

    Considers how sleepy an agent is.

    Stats

    The stats used in the farmer hero example.

    StatWatcher

    Configures a stat over time. This is used for increasing Hunger and Sleepiness.

    SwordFightAction

    Attacks and Destroy a monster immediately when performed.

    TreeObject

    A component to be attached to an object to define it as a tree. Place the game object under a parent with TreeObjectManager and it'll be added to the manager.

    TreeObjectManager

    WorkAction

    When performed, cuts a tree. Earns Money and Wood immediately.

    Interfaces

    IManagerObject<T>

    An interface to define it as a ManagerObject to be used by ObjectManager<T, TManager>

    In This Article
    Back to top Generated by DocFX