Beispiel #1
0
    IEnumerator Init()
    {
        yield return(FieldInit());

        _statemachine.Next(State.CreateField);
        yield return(null);
    }
Beispiel #2
0
 IEnumerator Init()
 {
     Debug.Log("[Game]Initialize");
     _gameUseCase.Reset();
     _statemachine.Next(State.LoadData);
     yield return(null);
 }
Beispiel #3
0
    IEnumerator Init()
    {
        Debug.Log("[WholeSequence]Init");
        yield return(null);

        _statemachine.Next(State.Advertise);
    }
Beispiel #4
0
 IEnumerator Init()
 {
     Debug.Log("[Root]Initialize");
     Application.targetFrameRate = 60;
     _statemachine.Next(State.Game);
     yield return(null);
 }
Beispiel #5
0
    IEnumerator Init()
    {
        Date = new GameDate(1, 1, 1, 0);
        Date._hour.OnLoop.AddListener(WeeklyEvent);
        Date._week.OnLoop.AddListener(MonthlyEvent);

        _statemachine.Next(State.Routine);
        yield return(null);
    }
Beispiel #6
0
    IEnumerator Init()
    {
        _gameId  = "";
        _gamePid = 0;
        while (_wsModule == null)
        {
            yield return(null);
        }
        yield return(_wsModule.SetupAsync(Server,
                                          null,
                                          OnMessage,
                                          (o, e) => Debug.Log($"WebSocket Close Code: {e.Code} Reason: {e.Reason}"),
                                          null));

        _statemachine.Next(State.Connect);
    }
Beispiel #7
0
    IEnumerator Init()
    {
        while (_wsModule == null)
        {
            yield return(null);
        }
        IsCancel          = false;
        _matchingId       = "";
        GameServerAddress = "";
        RoomId            = "";
        yield return(_wsModule.SetupAsync(Server,
                                          null,
                                          OnMessage,
                                          (o, e) => Debug.Log($"[ws] WebSocket Close Code: {e.Code} Reason: {e.Reason}"),
                                          null));

        _statemachine.Next(State.Connect);
    }
Beispiel #8
0
 public void InitState()
 {
     _statemachine = new Statemachine <State>();
     _statemachine.Init(this);
     _statemachine.Next(State.Init);
 }
Beispiel #9
0
 IEnumerator Init()
 {
     InstantiateDialog();
     _statemachine.Next(State.Wait);
     yield return(null);
 }
Beispiel #10
0
 IEnumerator Init()
 {
     _statemachine.Next(State.State1);
     yield return(null);
 }
Beispiel #11
0
 protected virtual void Awake()
 {
     _statemachine = new Statemachine <T>();
     _statemachine.Init(this);
     _statemachine.Next((T)Enum.GetValues(typeof(T)).GetValue(0));
 }
Beispiel #12
0
 protected void Next(T state) => _statemachine.Next(state);