コード例 #1
0
ファイル: InventoryTilable.cs プロジェクト: wty0512/FyWorld
        public InventoryTilable(Stackable parent, int count = 1, int max = -1)
        {
            this._max    = max;
            this._parent = parent;
            this.Create(count);

            /*
             *      We should think about this and maybe add steps, like for plants
             *      for example if it's less than half .7 scale, else 1f
             *      float scale = (float)count / (float)this.def.maxStack;
             *      this._parent.scale = new Vector3(scale, scale, 1f);
             */
        }
コード例 #2
0
        protected override void AddTilable(Vector2Int position)
        {
            // Add the field tialble, here we should check if we already have a field on this position.

/*			Field field = new Field(position, Defs.empty, this);
 *                      Loki.map.Spawn(
 *                              position,
 *                              field
 *                      );*/
            //this.fields.Add(field);
            Stackable stack = new Stackable(position, this);

            Loki.map.Spawn(position, stack);
            this.stacks.Add(stack);
            base.AddTilable(position);
        }
コード例 #3
0
 public Inventory(Stackable parent, int count = 1, int max = -1)
 {
     this._max    = max;
     this._parent = parent;
     this.Create(count);
 }