Example #1
0
    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();
    }
Example #2
0
    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();
    }
Example #3
0
    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);
    }