Example #1
0
    public static string WillChangeNotification(StatTypes type)
    {
        if (!_willChangeNotifications.ContainsKey (type))
            _willChangeNotifications.Add (type, string.Format ("Stats.{0}WillChange", type.ToString ()));

        return _willChangeNotifications[type];
    }
Example #2
0
 //to comunicate with others stats
 #region Notifications
 public static string WillChangeNotification(StatTypes type)
 {
     if (!_willChangeNotifications.ContainsKey(type))         //if don't, enter
     {
         _willChangeNotifications.Add(type, string.Format("Stats.{0}WillChange", type.ToString()));
     }
     return(_willChangeNotifications[type]);
 }
Example #3
0
 public static string DidChangeNotification(StatTypes type)
 {
     if (!_didChangeNotifications.ContainsKey(type))
     {
         _didChangeNotifications.Add(type, string.Format("Stats.{0}DidChange", type.ToString()));
     }
     return(_didChangeNotifications[type]);
 }
Example #4
0
File: Stats.cs Project: swejk/2DRPG
 public static string WillChangeNotification(StatTypes s)
 {
     if (!_willChangeNotifications.ContainsKey(s))
     {
         _willChangeNotifications.Add(s, string.Format("Stats.{0}WillChange", s.ToString()));
     }
     return _willChangeNotifications[s];
 }
Example #5
0
    public void InitConatinerPanel(StatsContainer sc, StatTypes stat)
    {
        this.sc   = sc;
        this.type = stat;

        statLabel.text = stat.ToString();
        input.text     = sc.GetValue(stat) + "";
    }
Example #6
0
    public void AddScore(int playerId, StatTypes s)
    {
        float scoreAmount = Rules.ScoreValues[s];

        Players[playerId].Properties.Score += scoreAmount;
        AddToStat(playerId, s);

        Players[playerId].UI.NewScore(s.ToString().ToLower(), scoreAmount);
    }
Example #7
0
 public override string ToString()
 {
     return(statTypes.ToString() + ":" + follows);
 }