Exemplo n.º 1
0
        public PlayerStateUserData GetUserData()
        {
            PlayerStateUserData data = new PlayerStateUserData();

            data.CurrentState = CurrentPlayerState;
            data.NextState    = NextPlayerState;
            data.RunTime      = States[(int)CurrentPlayerState].GetUserData();

            return(data);
        }
Exemplo n.º 2
0
        public void SetUserData(PlayerStateUserData data)
        {
            if (data == null)
            {
                return;
            }

            CurrentPlayerState = data.CurrentState;
            NextPlayerState    = data.NextState;
            if (data.RunTime != null)
            {
                States[(int)CurrentPlayerState].SetUserData(data.RunTime);
            }
        }