Exemple #1
0
 public static InputTask SoftObjectFactory(SoftObjectType type, int amount)
 {
     return(new InputTask(InputMode.Single, (cells, selected) => {
         foreach (Cell cell in cells)
         {
             SoftObject softObject = new SoftObject(type, amount);
             cell.World.SpawnSoftObject(softObject, cell, softObject.Count);
         }
     }, null));
 }
Exemple #2
0
        public PathfinderAStar PathForNearestSoftObject(SoftObjectType type, Cell startCell)
        {
            Cell endCell = NearestCell(startCell, (cell) => {
                return(cell.SoftObject != null && cell.SoftObject.Type == type);
            });

            if (endCell == null)
            {
                return(null);
            }
            return(new PathfinderAStar(this, startCell, endCell));
        }
Exemple #3
0
 public SoftObject(SoftObject clone, int amount)
 {
     type  = clone.Type;
     Count = amount;
 }
Exemple #4
0
 // Constructor
 public SoftObject(SoftObjectType type, int amount = 0)
 {
     this.type = type;
     Count     = amount;
 }