Example #1
0
    void Start()
    {
        // PickableUpObject
        PickedUp = false;
        disposed = false;

        wander   = GetComponent <WanderBehaviour>();
        seek     = GetComponent <SeekBehaviour>();
        avoid    = GetComponent <AvoidBehaviour>();
        steering = GetComponent <DelegatedSteering>();

        behaviour = new RobotBehaviour(this);
        board     = UnityEngine.Object.FindObjectsOfType <BlackBoard>()[0];

        CurrentBattery = FullBattery;

        CurrentTrash   = null;
        PickedUpObject = null;

        behaviour.Start();
    }
 public AvoidBehaviourDecorator(AbstractBehaviourComponent parentBehaviour, MovementBehaviour behaviour)
     : base(parentBehaviour, behaviour)
 {
     this.behaviour = behaviour as AvoidBehaviour;
     this.agent     = parentBehaviour.agent;
 }