示例#1
0
        public GameObject CreateUnit(SpawnUnit unit, Quaternion rotation, Transform parent)
        {
            // create unit
            GameObject instance = unit.Create(position, rotation, parent);

            // check if empty
            if (unit.IsEmpty())
            {
                units.Remove(unit);
            }
            // return instance
            return(instance);
        }
示例#2
0
 public SpawnUnit(SpawnUnit other) : this(other.prefab, other.amount)
 {
 }