示例#1
0
    public void SetGameplayState(int newState, double stateStartTime)
    {
        GameplayStateType NewState = (GameplayStateType)newState;

        switch (NewState)
        {
        case GameplayStateType.waiting:
            m_CurrentState = new GameplayState_waiting(this, stateStartTime);
            break;

        case GameplayStateType.countdown:
            m_CurrentState = new GameplayState_countdown(this, stateStartTime);
            break;

        case GameplayStateType.battle:
            m_CurrentState = new GameplayState_battle(this, stateStartTime);
            break;

        case GameplayStateType.ending:
            m_CurrentState = new GameplayState_ending(this, stateStartTime);
            break;

        default:
            break;
        }

        m_CurrentState.Init();
    }
示例#2
0
	// Use this for initialization
	void Start () {
        
        // Initialise base state
        CurrentStateType = GameplayStateType.waiting;
        m_NextStateType = GameplayStateType.waiting; 

        m_CurrentState = new GameplayState_waiting(this , PhotonNetwork.time);
        m_CurrentState.Init();
   } 
示例#3
0
    // Use this for initialization
    void Start()
    {
        // Initialise base state
        CurrentStateType = GameplayStateType.waiting;
        m_NextStateType  = GameplayStateType.waiting;

        m_CurrentState = new GameplayState_waiting(this, PhotonNetwork.time);
        m_CurrentState.Init();
    }
示例#4
0
 /// <summary>
 /// Sets up the stage for the NEXT gameplay state, note that this is only relevant for the SERVER
 /// </summary>
 /// <param name="type"></param>
 public void SetNextGameplayState( GameplayStateType type )
 {
     m_NextStateType = type;
 }
示例#5
0
 /// <summary>
 /// Tells owner to change states on next update cycle
 /// </summary>
 protected void AnnounceNextState(GameplayStateType stateType) {
     m_Owner.SetNextGameplayState(stateType);
 }
示例#6
0
 /// <summary>
 /// Sets up the stage for the NEXT gameplay state, note that this is only relevant for the SERVER
 /// </summary>
 /// <param name="type"></param>
 public void SetNextGameplayState(GameplayStateType type)
 {
     m_NextStateType = type;
 }
示例#7
0
 /// <summary>
 /// Tells owner to change states on next update cycle
 /// </summary>
 protected void AnnounceNextState(GameplayStateType stateType)
 {
     m_Owner.SetNextGameplayState(stateType);
 }