private GameController controller; // Cached connection to game controller component void Start() { ChangeState(new BlobStateMoving(this)); // Set initial state. controller = GetComponentInParent <GameController>(); //CHANGE: stateShrinking = new BlobStateShrinking(this);//Initialize's a blob state shrinking at start, for when it needs to check if its already moving }
void Start() { StateShrinking = new BlobStateShrinking(this); ChangeState(new BlobStateMoving(this)); // Set initial state. controller = GetComponentInParent <GameController>(); }