public EnnemyIdleState(StateMachine owner, SteeringBehavior steering, PerimeterController perimeterController, EnnemyStateScriptableObject stateData) { this.owner = owner; this.steeringBehavior = steering; this.controller = owner.GetComponent <EnnemyController>(); this.perimeterController = perimeterController; fov = owner.GetComponent <FieldOfView>(); this.stateData = stateData; }
void Start() { comboLimit = 4; GameObject perimeter = GameObject.FindWithTag("Perimeter"); perimeterScript = perimeter.GetComponent <PerimeterController>(); GameObject playMaster = GameObject.Find("PlayLevelMaster"); gameGUIScript = playMaster.GetComponent <GameGUI>(); //For when this script is attached to blackball if (this.transform.name == "BlackBall") { blackBall = this.gameObject; //blackBall = GameObject.Find("BlackBall"); } }
public void Enter() { owner.GetComponent <BabySwanController>().UpdateBabyMaterial(this.GetType()); owner.GetComponent <BabySwanController>().MAX_VELOCITY = stateData.stateSpeed; this.perimeterController = ((BabyStateMachine)owner).perimeterController; }
void Start() { comboLimit = 4; GameObject perimeter = GameObject.FindWithTag("Perimeter"); perimeterScript = perimeter.GetComponent<PerimeterController>(); GameObject playMaster = GameObject.Find("PlayLevelMaster"); gameGUIScript = playMaster.GetComponent<GameGUI>(); //For when this script is attached to blackball if(this.transform.name == "BlackBall") blackBall = this.gameObject;//blackBall = GameObject.Find("BlackBall"); }