Ejemplo n.º 1
0
    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;
    }
Ejemplo n.º 2
0
    // 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);
        }
    }
Ejemplo n.º 3
0
    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>();
        }
    }
Ejemplo n.º 4
0
 void Start()
 {
     game = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameControlller>();
     ui   = GetComponent <UIController>();
 }
Ejemplo n.º 5
0
 public override void RespondToInput(GameControlller controller, string[] separatedInputWords)
 {
     controller.roomNavigation.AttemptToChangeRooms(separatedInputWords[1]);
 }
Ejemplo n.º 6
0
    void Awake()
    {
        GameObject gameObject = GameObject.FindGameObjectWithTag("GameController");

        game = gameObject.GetComponent <GameControlller>();
    }
Ejemplo n.º 7
0
 public abstract void RespondToInput(GameControlller controller, string[] separatedInputWords);
Ejemplo n.º 8
0
 void Awake()
 {
     controller = GetComponent <GameControlller>();
     inputField.onEndEdit.AddListener(AcceptStringInput);
 }
Ejemplo n.º 9
0
 void Awake()
 {
     controller = GetComponent <GameControlller>();
 }
Ejemplo n.º 10
0
 private void Awake()
 {
     Instance = this;
 }