Пример #1
0
    void StatsManager()
    {
        for (int i = 0; i < dataCard.ListStats.statCards.Count; i++)
        {
            StatCard _currentStat = dataCard.ListStats.statCards[i];

            EditorGUILayout.BeginHorizontal();

            EditorGUILayout.BeginVertical();

            _currentStat.Stat = (ECardStat)EditorGUILayout.EnumPopup("Stat's Type : ", _currentStat.Stat);

            _currentStat.Data = EditorGUILayout.FloatField("Stat's Data : ", _currentStat.Data);

            EditorGUILayout.EndVertical();

            dataCard.ListStats.statCards[i] = _currentStat;

            if (GUILayout.Button(" X "))
            {
                dataCard.RemoveStat(_currentStat);
            }

            EditorGUILayout.EndHorizontal();

            EditorGUILayout.Space();
        }
    }
Пример #2
0
    static void ResetTool()
    {
        allCards = HAD_PathHelper.GetCardsDataBase();

        dataCard = new DataCard();

        dataCard.ListStats = new ListStatCard(new List <StatCard>());

        newStat = new StatCard();

        sprite = null;
    }
Пример #3
0
    public void ShowCardStats(StatCard sc)
    {
        string disp = "";
        string ws   = sc.Weapon.GetComponent <WeaponStats>().name;

        disp += "Most Kills in One Game: " + m_st.GetVal(m_st.MaxWeaponKills, ws) + "   \t \t \t| Highest Score in One Game: " + m_st.GetVal(m_st.MaxWeaponScores, ws) + "\n";
        disp += "Lifetime Kills: " + m_st.GetVal(m_st.LifetimeWeaponKills, ws) + "       \t \t \t \t \t \t \t| Lifetime Score: " + m_st.GetVal(m_st.LifetimeWeaponScores, ws) + "\n";
        disp += "Most Uses (one game): " + m_st.GetVal(m_st.MaxWeaponSwitches, ws) + "    \t \t \t \t| Total Times Used: " + m_st.GetVal(m_st.LifetimeWeaponSwitches, ws) + "\n";
        disp += "Highest Level: " + m_st.GetVal(m_st.MaxWeaponUsedAtLevel, ws) + "\n";

        StatDisplay.text = disp;
        if (sc.Weapon.GetComponent <Achievement>() != null)
        {
            Message.text = "Achievement: \"" + sc.Weapon.GetComponent <Achievement>().DisplayName + "\"  : " + sc.Weapon.GetComponent <Achievement>().GetAchievementDescription();
        }
        else
        {
            Message.text = "Unlocked from Start";
        }
    }