示例#1
0
    public void ChangeState(BaseEntityState <SceneMain> newState)
    {
        // ステートチェンジ
        stateMachine.ChangeState(newState);

        // ステート同期用メッセージ
        char[]        newStateName = newState.GetType().FullName.ToCharArray();
        SyncStateInfo info;

        info.cStateName = new char[128];
        for (int i = 0; i < newStateName.Length; i++)
        {
            info.cStateName[i] = newStateName[i];
        }

        MessageManager.Dispatch(playerManager.GetMyPlayerID(), MessageType.SyncState, info);
    }
示例#2
0
 public bool isInState(BaseEntityState <entity_type> st)
 {
     return(currentState.GetType() == st.GetType());
 }