예제 #1
0
 protected Buildable(BuildablePrototype b)
 {
     this.name               = b.name;
     this.sprite             = Sprite_Manager.instance.GetSprite(b.sprite);
     this.animatorController = Sprite_Manager.instance.GetAnimator(b.animatorController);
     this.buildableType      = b.buildableType;
     this.stats              = new Stat[b.stats.Length];
     for (int i = 0; i < this.stats.Length; i++)
     {
         this.stats[i] = new Stat(b.stats[i].statType, b.stats[i].minValue, b.stats[i].maxValue);
     }
 }
예제 #2
0
 public static Buildable CreateInstance(BuildablePrototype prototype)
 {
     return(new Buildable(prototype));
 }