Show / Hide Table of Contents

Class RunningContinuingBrain

Makes animal run back and forth between two points with third point towards which animal starts running initially, but then it receives path from third to last point before third point is reached.

Inheritance
System.Object
Brain
RunningContinuingBrain
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 RunningContinuingBrain : Brain
Remarks

This is meant to help with testing of path update handling on client.

Constructors

RunningContinuingBrain()

Declaration
public RunningContinuingBrain()

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 middle, bool flee)
Parameters
Type Name Description
Animal animal
Vector3i from
Vector3i to
Vector3i middle
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
☀
☾