예제 #1
0
        private static IEnumerable <StatPoint> MakeDifference(IDictionary <NodeRef, StatPoint> newValues, IDictionary <NodeRef, StatPoint> prewValues)
        {
            List <StatPoint> answer = new List <StatPoint>(newValues.Count);

            foreach (var keyValuePair in newValues)
            {
                StatPoint statPoint = new StatPoint
                {
                    NodeRef  = keyValuePair.Key,
                    StatType = keyValuePair.Value.StatType,
                    Time     = keyValuePair.Value.Time,
                    Value    = keyValuePair.Value.Value,
                };
                StatPoint oldStatPoint;
                if (prewValues.TryGetValue(keyValuePair.Key, out oldStatPoint))
                {
                    if (oldStatPoint.Value <= statPoint.Value)
                    {
                        statPoint.Value -= oldStatPoint.Value;
                    }
                }
                else
                {
                    statPoint.Value = 0;
                }

                answer.Add(statPoint);
            }
            return(answer);
        }
예제 #2
0
 public void Red()
 {
     info.text = "Strength : Increases Physical Attack";
     if (i > i1)
     {
         i = i - 1;
         StatPoint rb = GetComponent <StatPoint>();
         double    a  = rb.points;
         rb.Changepoint(+1);
         Debug.Log(a);
         string s;
         s = (i).ToString();
         selectedName.text = s;
         NonUP SD = GetComponent <NonUP>();
         SD.Strength1(i);
     }
 }
예제 #3
0
 public void Red()
 {
     info.text = "Intelligence : Increases Magic Attack and Mana";
     if (i > i1)
     {
         i = i - 1;
         StatPoint rb = GetComponent <StatPoint>();
         double    a  = rb.points;
         rb.Changepoint(+1);
         Debug.Log(a);
         string s;
         s = (i).ToString();
         selectedName.text = s;
         NonUP SD = GetComponent <NonUP>();
         SD.Intelligence1(i);
     }
 }
예제 #4
0
 public void Red()
 {
     info.text = "Dexternity : Increases Agility";
     if (i > i1)
     {
         i = i - 1;
         StatPoint rb = GetComponent <StatPoint>();
         double    a  = rb.points;
         rb.Changepoint(+1);
         Debug.Log(a);
         string s;
         s = (i).ToString();
         selectedName.text = s;
         NonUP SD = GetComponent <NonUP>();
         SD.Dexternity1(i);
     }
 }
예제 #5
0
 public void Red()
 {
     info.text = "Endurance : Increases HP And Stamina";
     if (i > i1)
     {
         i = i - 1;
         StatPoint rb = GetComponent <StatPoint>();
         double    a  = rb.points;
         rb.Changepoint(+1);
         Debug.Log(a);
         string s;
         s = (i).ToString();
         selectedName.text = s;
         NonUP SD = GetComponent <NonUP>();
         SD.Endurance1(i);
     }
 }
예제 #6
0
 public void Red()
 {
     info.text = "Vitality : Increases Physical Defence/Resistance";
     if (i > i1)
     {
         i = i - 1;
         StatPoint rb = GetComponent <StatPoint>();
         double    a  = rb.points;
         rb.Changepoint(+1);
         Debug.Log(a);
         string s;
         s = (i).ToString();
         selectedName.text = s;
         NonUP SD = GetComponent <NonUP>();
         SD.Vitality1(i);
     }
 }
예제 #7
0
 public void Red()
 {
     info.text = "Constitution : Increases Increase Magic Defense/Resistance";
     if (i > i1)
     {
         i = i - 1;
         StatPoint rb = GetComponent <StatPoint>();
         double    a  = rb.points;
         rb.Changepoint(+1);
         Debug.Log(a);
         string s;
         s = (i).ToString();
         selectedName.text = s;
         NonUP SD = GetComponent <NonUP>();
         SD.Constitution1(i);
     }
 }
예제 #8
0
    public void OnMouseClick()
    {
        info.text = "Strength : Increases Physical Attack";
        StatPoint rb = GetComponent <StatPoint>();
        double    a  = rb.points;

        if (a > 0)
        {
            i = i + 1;
            rb.Changepoint(-1);
            Debug.Log(a);
            string s;
            s = (i).ToString();
            selectedName.text = s;
            NonUP SD = GetComponent <NonUP>();
            SD.Strength1(i);
        }
    }