Esempio n. 1
0
 public void React(ThrowableType[] types)
 {
     Debug.Log(types[0]);
     Debug.Log(types[1]);
     if(types[0] == types[1]){
         _score += 50;
         updateScore();
     }else{
         _score -= 25;
         _health -= 1;
         updateScore();
         CheckConditions();
     }
 }
Esempio n. 2
0
    public void printHello(ThrowableType type)
    {
        //ObjectType type){
        switch(type){
        case ThrowableType.A:
            Debug.Log("New Game state");
            //GameObject.Find("NewGameState").transform.position = Vector3.zero;
            //GameObject.Find("MainState").transform.position = new Vector3(1000.0f,0.0f,0.0f);
            break;
        case ThrowableType.B:
            Debug.Log("Settings state");
            break;
        case ThrowableType.C:
            Debug.Log("Credits state");
            break;
        case ThrowableType.D:
            Debug.Log("Quit state");
            break;
        default:
            Debug.Log("Hello from GameWorld!! Default");
            break;

        }
    }
Esempio n. 3
0
 public void React(ThrowableType[] types)
 {
     worldBehaviour.React(types);
 }
Esempio n. 4
0
    public void React(ThrowableType[] types)
    {
        var type = types[0];

        switch(type){
        case ThrowableType.A:
            switch(_currentState){
            case GameState.MainState:
                // New Game Label in Main State
                _mainState.transform.position = _notVisible;
                _newGameState.transform.position = _visible;
                _currentState = GameState.NewGameState;
                break;
            case GameState.NewGameState:
                //Back Label in New Game State
                _newGameState.transform.position = _notVisible;
                _mainState.transform.position = _visible;
                _currentState = GameState.MainState;
                break;
            case GameState.SettingsState:
                break;
            case GameState.QuitConfirmState:
                Application.Quit();
                break;
            case GameState.CreditsState:
                _creditsState.transform.position = _notVisible;
                _mainState.transform.position = _visible;
                _names.SetActive(false);
                _currentState = GameState.MainState;
                break;
            }
            break;
        case ThrowableType.B:
            switch(_currentState){
            case GameState.QuitConfirmState:
                _mainState.transform.position = _visible;
                _quitState.transform.position = _notVisible;
                _currentState = GameState.MainState;
                break;
            case GameState.NewGameState:
                Application.LoadLevel("02_recycle_game");
                break;
            }
            break;
        case ThrowableType.C:
            switch(_currentState){
            case GameState.MainState:
                _mainState.transform.position = _notVisible;
                _quitState.transform.position = _visible;
                _currentState = GameState.QuitConfirmState;
                break;
            }
            break;
        case ThrowableType.D:
            switch(_currentState){
            case GameState.MainState:
                _mainState.transform.position = _notVisible;
                _creditsState.transform.position = _visible;
                _names.SetActive(true);
                _currentState = GameState.CreditsState;
                break;
            }

        break;

        }//switch
    }