Ejemplo n.º 1
0
 internal Element()
 {
     m_visible          = true;
     m_parent           = null;
     m_children         = new ConcurrentBag <Element>();
     m_position         = Vector2.Zero;
     m_size             = Vector2.One;
     m_state            = e_State.Normal;
     m_subMenuDirectory = string.Empty;
 }
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        switch (gameState)
        {
        case e_State.Pause:

            //Waiting

            break;

        case e_State.Play:

            spoutPourTime -= Time.deltaTime;

            if (spoutPourTime <= 0)
            {
                spout.TurnOff();
                if (HasWon())
                {
                    if (isEndless)
                    {
                        EndlessRunIncrement();
                        break;
                    }

                    gameState = e_State.Drink;
                    break;
                }
                else
                {
                    if (isEndless)
                    {
                        LoseEndless();
                    }
                    else
                    {
                        LoseNormal();
                    }
                }
            }

            //player.GetComponent<CameraUpdate> ().UpdateCamera (GetDrunkForceValue(), Input.acceleration.x);

            break;

        case e_State.Drink:

            //Do some shit here Rhys

            break;
        }
    }
Ejemplo n.º 3
0
 void SetProperty(
     e_State state,
     int def,
     int vigour,
     int capacity,
     Vector2 location,
     float enemyTroops,
     float playerTroops,
     float schedule)
 {
     SetInitState(state);
     _DEF          = def;
     _vigour       = vigour;
     _capacity     = capacity;
     _location     = location;
     _enemyTroops  = enemyTroops;
     _playerTroops = playerTroops;
     _schedule     = schedule;
 }
Ejemplo n.º 4
0
 void SetInitState(e_State state)
 {
     _fsmState = _fsm.GetState(state);
     _fsmState.OnEnter();
 }
Ejemplo n.º 5
0
 public void SetState_Rush()
 {
     playerState = e_State.Rush;
 }
Ejemplo n.º 6
0
 public void SetState_Jump()
 {
     playerState = e_State.Jump;
 }
Ejemplo n.º 7
0
 public void SetState_Stern()
 {
     playerState = e_State.Stern;
 }
Ejemplo n.º 8
0
 public void SetState_Die()
 {
     playerState = e_State.Die;
     Destroy(this.gameObject);
 }
Ejemplo n.º 9
0
 public void SetState_None()
 {
     playerState = e_State.None;
 }
Ejemplo n.º 10
0
 public void StartGame()
 {
     gameState = e_State.Play;
     spout.TurnOn();
 }