Exemple #1
0
        public MainGameModel() : base()
        {
            LoadDataAsset <Data.MainGameData>(MAIN_GAME_DATA);

            OnCompleteLoadData.Subscribe(value =>
            {
                var entity = new Entity.MainGameEntity(value as Data.MainGameData);

                PlayerEntity     = entity.PlayerEntity;
                CharacterEntitys = entity.CharacterEntities;

                _onReady.OnNext(this);
            });
        }
Exemple #2
0
        public CharacterSelectModel()
        {
            LoadDataAsset <Data.MainGameData>(MAIN_GAME_DATA);

            OnCompleteLoadData.Subscribe(data =>
            {
                var characterDatas = (data as Data.MainGameData).CharacterDatas;

                foreach (var item in characterDatas)
                {
                    _charaSelectEntities.Add(new CharacterSelectItemEntity(item.CharacterName));
                    _characterEntities.Add(new CharacterEntity(item));
                }

                _onReady.OnNext(this);
            });
        }