Example #1
0
 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");
        }
    }
Example #3
0
 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");
    }