Esempio n. 1
0
    public void RandomizeDisplayName()
    {
        if (availableNames == null)
        {
            availableNames = ScriptableObject.CreateInstance <PartnerNames>();
        }

        displayName = availableNames.names[Random.Range(0, availableNames.names.Length)];
        name        = $"{displayName}";
    }
Esempio n. 2
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);
    }