Esempio n. 1
0
 public virtual void Awake()
 {
     BackButton.Init();
     SoundyManager.Init();
     Database.Add(GetComponent <T>());
     UpdateStartValues();
 }
    public void Init(GameManager gameManager, MainMenu mainMenu)
    {
        this.gameManager = gameManager;
        this.mainMenu    = mainMenu;

        //Initialize the buttons
        leftFireButton.Init(0, SpellHandler.SpellElement.FIRE, true, this);
        leftWaterButton.Init(1, SpellHandler.SpellElement.WATER, true, this);
        leftEarthButton.Init(2, SpellHandler.SpellElement.EARTH, true, this);
        leftAirButton.Init(3, SpellHandler.SpellElement.AIR, true, this);
        rightFireButton.Init(4, SpellHandler.SpellElement.FIRE, false, this);
        rightWaterButton.Init(5, SpellHandler.SpellElement.WATER, false, this);
        rightEarthButton.Init(6, SpellHandler.SpellElement.EARTH, false, this);
        rightAirButton.Init(7, SpellHandler.SpellElement.AIR, false, this);
        fightButton.Init(8, gameManager, this, mainMenu);
        backButton.Init(9, this, mainMenu);
    }
Esempio n. 3
0
    public void Init(GameManager gameManager, MainMenu mainMenu)
    {
        this.gameManager = gameManager;
        this.mainMenu    = mainMenu;
        player           = gameManager.GetPlayer();
        gestureManager   = player.GetGestureManager();
        gestureManager.SetCalibrationMenu(this);

        gestureSet = new bool[5];

        //Initialize the buttons
        gestureQuickButton.Init(0, SpellHandler.SpellType.ONE_QUICK, this);
        gestureHeavyButton.Init(1, SpellHandler.SpellType.ONE_HEAVY, this);
        gestureSpecialButton.Init(2, SpellHandler.SpellType.ONE_SPECIAL, this);
        gestureOffensiveButton.Init(3, SpellHandler.SpellType.TWO_OFFENSE, this);
        gestureDefensiveButton.Init(4, SpellHandler.SpellType.TWO_DEFENSE, this);
        startButton.Init(5, this);
        restartButton.Init(6, this);
        backButton.Init(7, this, mainMenu);
    }