public void RegisterGameSession(ref GameSession _session) { gameSession = _session; gameSession.NextTherapySession(); a.text = $"<sprite name=\"{gameSession.GetActiveTherapy().relationship.partnerA.displayName}\">"; b.text = $"<sprite name=\"{gameSession.GetActiveTherapy().relationship.partnerB.displayName}\">"; act = gameSession.GetActiveTherapy(); pa = act.relationship.partnerA.stats; pb = act.relationship.partnerB.stats; act.NextSession(); }
public override void OnInspectorGUI() { PartnerStats myScript = (PartnerStats)target; if (GUILayout.Button("SYNC")) { myScript.SyncStatSize(myScript.StatCount); myScript.SyncStatNames(); } if (GUILayout.Button("RANDOMIZE")) { myScript.SyncStatSize(myScript.StatCount); myScript.ApplyRandomize(); } DrawDefaultInspector(); }
public void Initialize(PartnerStatsSettings ps) { if (stats == null) { stats = gameObject.AddComponent <PartnerStats>(); } if (ps != null) { DefaultSettings = ps; stats.DefaultSettings = DefaultSettings; if (DefaultSettings.availablePartnerNames != null) { availableNames = DefaultSettings.availablePartnerNames; } } RandomizeDisplayName(); stats.Initialize(ps); }