Beispiel #1
0
 void Awake()
 {
     lifeBar = GameObject.FindGameObjectWithTag("LifeBar").GetComponent<Image>();
     rigidBoss = GameObject.FindGameObjectWithTag("Boss").GetComponent<Rigidbody2D> ();
     eventsVerifyBoss = GameObject.Find ("SceneManager").GetComponent<EventsVerifyBoss> ();
     gameManagerGeneric = GameManagerGeneric.Instance;
 }
Beispiel #2
0
    // Use this for initialization
    void Awake()
    {
        sceneName = "Boss";
        popUp = GameObject.Find("SceneManager").GetComponent<DataObjectPopUp>();
        controllerBoss = new ControllerBoss (Boss);
        eventsVerifyBoss = gameObject.GetComponent<EventsVerifyBoss> ();
        eventsVerifyBoss.setController (controllerBoss);

        controllerDino = new ControllerDino(Dino);
        gamepad = gameObject.AddComponent<Gamepad>();
        gamepad.SetController (controllerDino);

        controllerPauseOptions = new ControllerPauseOptions();
        gamepad = gameObject.AddComponent<Gamepad>();
        gamepad.SetController (controllerPauseOptions);
    }