Show / Hide Table of Contents

Class RunningInterruptingBrain

Makes animal run between two points, but always interrupt halfway and start running towards another point.

Inheritance
System.Object
Brain
RunningInterruptingBrain
Inherited Members
Brain.StarvingThreshold
Brain.HungerToStartEating
Brain.HungerToStopEating
Brain.DefaultBehavior
Brain.Memory
Brain.TickBehaviors(Animal)
Brain.Tick(Animal)
Brain.OnBecameVisible(IWorldObserver, Animal)
Brain.OnBecameInvisible()
Brain.Anim(AnimalState, Boolean, Func<Animal, Single>)
Brain.Anim(AnimalState, Boolean, Single)
Brain.UpdateAnger(Animal, Single)
Brain.UpdateHunger(Animal, Single)
Brain.DecayAlertness(Animal, Single)
Brain.SetDamaged(Animal, INetObject, Boolean)
Brain.PlayerAvoidance(Animal)
Brain.ReactOnBlock(Animal, Vector3, Single)
Namespace: Eco.Simulation.Agents.AI
Assembly: Eco.Simulation.dll
Syntax
public class RunningInterruptingBrain : Brain

Constructors

RunningInterruptingBrain()

Declaration
public RunningInterruptingBrain()

Properties

ClearMemoryWhenNotVisible

Declaration
public override bool ClearMemoryWhenNotVisible { get; }
Property Value
Type Description
System.Boolean
Overrides
Brain.ClearMemoryWhenNotVisible

Methods

RootBehavior(Animal)

Declaration
public override Behavior<Animal> RootBehavior(Animal animal)
Parameters
Type Name Description
Animal animal
Returns
Type Description
Behavior<Animal>
Overrides
Brain.RootBehavior(Animal)

SetupAnimal(Animal, Vector3i, Vector3i, Vector3i, Boolean)

Sets animal brain and memory to make it run between 'from' and 'to', but never reach 'to' and always get interrupted with a new path leading to 'interrupt' or 'from', so it runs back and forth testing path interruption handling.

Declaration
public static bool SetupAnimal(Animal animal, Vector3i from, Vector3i to, Vector3i interrupt, bool flee)
Parameters
Type Name Description
Animal animal
Vector3i from
Vector3i to
Vector3i interrupt
System.Boolean flee
Returns
Type Description
System.Boolean

False if setup failed and path wasn't found.

☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾