private float elapsedTime; // time elapsed void Start() { // get the steerings arrive = GetComponent <Arrive>(); if (arrive == null) { Debug.LogError(gameObject + " has no Arrive attached in " + this); } wander = GetComponent <Wander>(); if (wander == null) { Debug.LogError(gameObject + " has no Wander attached in " + this); } // get the blackboard blackboard = GetComponent <BEE_Blackboard>(); if (blackboard == null) { blackboard = gameObject.AddComponent <BEE_Blackboard>(); } }
void Start() { blackboard = GetComponent <BEE_Blackboard>(); if (blackboard == null) { blackboard = gameObject.AddComponent <BEE_Blackboard>(); } fsmBeePollinate = GetComponent <FSM_BEE_POLLINATE>(); if (fsmBeePollinate == null) { fsmBeePollinate = gameObject.AddComponent <FSM_BEE_POLLINATE>(); } fsmBeeDefend = GetComponent <FSM_BEE_DEFEND>(); if (fsmBeeDefend == null) { fsmBeeDefend = gameObject.AddComponent <FSM_BEE_DEFEND>(); } fsmBeePollinate.enabled = true; fsmBeeDefend.enabled = false; }
void Start() { defend = GetComponent <KeepDistanceVersatile>(); if (defend == null) { Debug.LogError(gameObject + " has no KeepDistanceVersatile attached in " + this); } KS = GetComponent <KinematicState>(); if (KS == null) { Debug.LogError(gameObject + " has no Kinematic state attached in " + this); } blackboard = GetComponent <BEE_Blackboard>(); if (blackboard == null) { blackboard = gameObject.AddComponent <BEE_Blackboard>(); } queenBee = GameObject.FindGameObjectWithTag("QueenBee"); defend.enabled = false; }