protected override void OnSubscribe(DragonStore <string> dragonObject) { dragonObject.OnChange(this, (s, prev) => { LoadingText.text = s; }); }
protected override void OnSubscribe(DragonStore <JusticeModel> dragonObject) { dragonObject.Value.FinalData.OnChange(this, (data, prev) => { Top1Text.text = data.Properties[0]; Top2Text.text = data.Properties[1]; Top3Text.text = data.Properties[2]; StatsText.text = data.FinalText; }); }
protected override void OnSubscribe(DragonStore <JusticeModel> dragonObject) { dragonObject.Value.CurrentProfile.OnChange(this, (profile, prev) => { if (profile.FileName == null) { return; } transform.RemoveAllChildren(); Instantiate(ProfileDetailsComponent, transform, false).SetProfile(profile, Data.Value.Total.Value); Instantiate(ProfileComponent, transform, false).SetProfile(profile, Data.Value.Total.Value); GameState.Profile.Set(State.Enabled); GameState.Loading.Set(State.Disabled); }); }
public JusticeModel() { GameId = new DragonStore <string>("start"); CurrentProfile = new DragonStore <Profile>(new Profile()); Round = new DragonStore <int>(1); LoadingMessage = new DragonStore <string>("Training to match your decisions and removing irrelevant features."); Total = new DragonStore <int>(0); MinTotal = new DragonStore <int>(0); MaxTotal = new DragonStore <int>(0); Swipes = new List <int>(); Profiles = new DragonStore <Queue <Profile> >(new Queue <Profile>()); AllProfiles = new DragonStore <List <Profile> >(new List <Profile>()); FinalData = new DragonStore <FinalData>(new FinalData()); // Get Initial Server Data FetchProfiles(new JObject()); }
private void Awake() { InitStores(); Model = new DragonStore <JusticeModel>(new JusticeModel()); InitGameState(); }