void Awake() { GameObject gameObject = GameObject.FindGameObjectWithTag("Right bounds"); if (gameObject != null) { rightBounds = gameObject.transform; } gameObject = GameObject.FindGameObjectWithTag("Left bounds"); if (gameObject != null) { leftBounds = gameObject.transform; } gameObject = GameObject.FindGameObjectWithTag("GameController"); if (gameObject != null) { game = gameObject.GetComponent <GameControlller>(); } gameObject = GameObject.FindGameObjectWithTag("Ball"); if (gameObject != null) { ball = gameObject.GetComponent <BallBehavior>(); } gameObject = GameObject.FindGameObjectWithTag("Arrow"); if (gameObject != null) { arrow = gameObject; } arrow.GetComponent <ArrowBehavior>().player = this.gameObject; }
// Use this for initialization void Start() { currentTime = startTime; if (gam == null) { gam = this.gameObject.GetComponent <GameControlller>(); } mainScoretext.text = "0"; if (gameOverScoreOutline) { gameOverScoreOutline.SetActive(false); } if (playAgainButton) { playAgainButton.SetActive(false); } if (nextLevelButton) { nextLevelButton.SetActive(false); } }
void Start() { GameObject gameObject = GameObject.FindGameObjectWithTag("GameController"); if (gameObject != null) { game = gameObject.GetComponent <GameControlller>(); } gameObject = GameObject.FindGameObjectWithTag("Canvas"); if (gameObject != null) { scoreManager = gameObject.GetComponent <ScoreManager>(); } }
void Start() { game = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameControlller>(); ui = GetComponent <UIController>(); }
public override void RespondToInput(GameControlller controller, string[] separatedInputWords) { controller.roomNavigation.AttemptToChangeRooms(separatedInputWords[1]); }
void Awake() { GameObject gameObject = GameObject.FindGameObjectWithTag("GameController"); game = gameObject.GetComponent <GameControlller>(); }
public abstract void RespondToInput(GameControlller controller, string[] separatedInputWords);
void Awake() { controller = GetComponent <GameControlller>(); inputField.onEndEdit.AddListener(AcceptStringInput); }
void Awake() { controller = GetComponent <GameControlller>(); }
private void Awake() { Instance = this; }