void CreateIsntalledObjectPrototypes() { furniturePrototypes = new Dictionary <string, Furniture>(); furniturePrototypes.Add("Wall", Furniture.CreatePrototype("Wall", 0, 1, 1, true) ); }
void CreateFurnPrototypes() { furnPrototypes = new Dictionary <string, Furniture>(); furnPrototypes.Add("Wall", Furniture.CreatePrototype( "Wall", 0, // Impassable 1, 1, true) ); }
void CreateFurniturePrototypes() { furniturePrototypes = new Dictionary <string, Furniture> (); furniturePrototypes.Add("Wall", Furniture.CreatePrototype( "Wall", // Internal ID 0, // Movement resistance 1, // Width 1, // Height true) // Links to neighbour. ); }
void CreateFurniturePrototypes() { furniturePrototypes = new Dictionary <string, Furniture>(); furniturePrototypes.Add("Wall", Furniture.CreatePrototype( "Wall", 0, 1, 1, true //Links to neighbours and sort of become "part of" a larger object ) ); }
void CreateFurniturePrototypes() { Debug.Log("Creating furniture prototypes..."); furniturePrototypes = new Dictionary <string, Furniture>(); Furniture wallPrototype = Furniture.CreatePrototype( "Wall", 0, 1, 1, true // links to neighbors and sort of becomes part of a larger object ); furniturePrototypes.Add("Wall", wallPrototype); }
void CreateFurniturePrototypes() { furniturePrototypes = new Dictionary <string, Furniture>(); furniturePrototypes.Add("Wall", Furniture.CreatePrototype( "Wall", 0, // Impassable 1, // Width 1, // Height true // Links to neighbours and "sort of" becomes part of a large object ) ); }
void CreateFurniturePrototypes() { // TODO: Replace this by a function that reads our furniture data from a text file. furniturePrototypes = new Dictionary <string, Furniture>(); furnitureJobPrototypes = new Dictionary <string, Job>(); furniturePrototypes.Add("Wall", Furniture.CreatePrototype( "Wall", // Name 0, // Impassable 1, // Width 1, // Height true, // Links to neighbour and "sort of" becomes a large object true // Enclose rooms ) ); furnitureJobPrototypes.Add("Wall", new Job(null, "Wall", FurnitureActions.JobComplete_FurnitureBuilding, .2f, new Inventory[] { new Inventory("Steel_Plate", 5, 0) }) ); furniturePrototypes.Add("Lamp", Furniture.CreatePrototype( "Lamp", // Name 1, // Impassable 1, // Width 1, // Height false, // Links to neighbour and "sort of" becomes a large object false // Enclose rooms ) ); //furnitureJobPrototypes.Add("Wall", // new Job(null, "Wall", FurnitureActions.JobComplete_FurnitureBuilding, .2f, new Inventory[] { new Inventory("Steel_Plate", 5, 0) }) // ); furniturePrototypes.Add("Door", Furniture.CreatePrototype( "Door", // Name 1.5f, // Pathfinding movecost 1, // Width 1, // Height false, // Links to neighbour and "sort of" becomes a large object true // Enclose rooms ) ); // What if the objects behavioues were scriptable? And therefore were part of the text file we are reading now furniturePrototypes["Door"].SetParameter("openness", 0); furniturePrototypes["Door"].SetParameter("is_opening", 0); furniturePrototypes["Door"].RegisterUpdateAction(FurnitureActions.Door_UpdateAction); furniturePrototypes["Door"].IsEnterable = FurnitureActions.Door_IsEnterable; furniturePrototypes.Add("Stockpile", Furniture.CreatePrototype( "Stockpile", // Name 1, // Impassable 1, // Width 1, // Height true, // Links to neighbour and "sort of" becomes a large object false // Enclose rooms ) ); furniturePrototypes["Stockpile"].RegisterUpdateAction(FurnitureActions.Stockpile_UpdateAction); furnitureJobPrototypes.Add("Stockpile", new Job(null, "Stockpile", FurnitureActions.JobComplete_FurnitureBuilding, -1f, null) ); furniturePrototypes.Add("Oxygen Generator", Furniture.CreatePrototype( "Oxygen Generator", // Name 10, // Impassable 2, // Width 2, // Height false, // Links to neighbour and "sort of" becomes a large object false // Enclose rooms ) ); }