// public  GameObject         buttonQuit;
 // public GameObject buttonSliderMusic;
 public ControllerOptionsButtons()
 {
     gameManager = GameManagerGeneric.Instance;
     dataObjectPopUp = GameObject.Find("SceneManager").GetComponent<DataObjectPopUp>();
        // eventSystem = GameObject.Find("EventSystem");
     //buttonQuit = GameObject.Find("ButtonQuit");
     //buttonSliderMusic = GameObject.Find("SliderMusic");
 }
예제 #2
0
    void Awake()
    {
        dataObjectPopUp = GameObject.Find("SceneManager").GetComponent<DataObjectPopUp>();

        if (Application.loadedLevelName != "Level 0")
            popPause = false;
        else
            popPause = true;
    }
예제 #3
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);
    }
예제 #4
0
 public ControllerPauseOptions()
 {
     gameManager = GameManagerGeneric.Instance;
     popUp = GameObject.Find("SceneManager").GetComponent<DataObjectPopUp>();
 }
예제 #5
0
 void Start()
 {
     dataObjectPopUp = GameObject.Find("SceneManager").GetComponent<DataObjectPopUp>();
 }
예제 #6
0
    //private List<GameObject> enemiesPositions;
    void Awake()
    {
        sceneName = "Level 0";
        popUp = GameObject.Find("SceneManager").GetComponent<DataObjectPopUp>();
        controllerDino = new ControllerDino(dino, BarraDeFome, 2);
        BarraDeFome.maxValue = dino.GetComponent<DataObjectDino>().InitialFome;

        controllercamera = new ControllerCamera(dino);
        gamepad = gameObject.AddComponent<Gamepad>();
        gamepad.SetController (controllerDino);

        //enemiesPositions = new List<GameObject>(GameObject.FindGameObjectsWithTag("Enemy"));
        //for(int i=0;i<enemiesPositions.Count;i++)
        foreach(GameObject enemy in new List<GameObject>(GameObject.FindGameObjectsWithTag("Spawner")))
        {
            EventsObjects.Add(enemy.name, enemy);
        }

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