示例#1
0
 public void Set(Statistic s, StatisticHolder origin, CarryType t)
 {
     statistic = s;
     type = t;
     originalStat = origin;
     originalStat.AddSavable(this);
     GameState.IsCarrying = true;
 }
示例#2
0
 public void Deliver(StatisticHolder target)
 {
     if (target.type == type && active)
     {
       float remainder = target.GetStatistic.Inject( statistic);
       if (remainder == 0)
       {
     originalStat.RemoveSavable(this);
     GameState.IsCarrying = false;
     Destroy(gameObject);
       }
       else {
     statistic.Value = remainder;
       }
     }
 }