public MainGalaxyViewModel(IGalaxyPopulator initGalaxyCreator, IGalaxyViewModelFactory initGalaxyViewModelFactory, ISolarSystemViewModelFactory initSolarSystemViewModelFactory, IPlanetViewModelFactory initPlanetViewModelFactory, ITextOutputViewModel initTextOutputViewModel, ITickEngine initTickEngine) { _galaxyCreator = initGalaxyCreator; _tickEngine = initTickEngine; _galaxyViewModelFactory = initGalaxyViewModelFactory; _solarSystemViewModelFactory = initSolarSystemViewModelFactory; _planetViewModelFactory = initPlanetViewModelFactory; TextOutput = initTextOutputViewModel; StarChart.InitialiseStarChart(); ResourceTypes.InitialiseResourceTypes(); BluePrints.InitialiseBluePrints(); loadOrCreateGalaxy(); initialiseEngine(); saveGalaxy(); }
public ProducerController(Producer p, PlanetController pc, IActorRef actorTextOutput) { _model = p; _planetC = pc; _actorTextOutput = actorTextOutput; _bp = BluePrints.GetBluePrint(p.BluePrintType); }
public void Start() { myBluePrint = AvalaibleBluePrints.available[(int)myBluePrintName]; /* * for(int i=0; i<AvalaibleBluePrints.available.Count;i++) * { * Debug.Log (AvalaibleBluePrints.available[i].name.ToString()+"/n"); * } */ }
static public void SetUp() { //weapons BluePrints swordBluePrint = new BluePrints(); swordBluePrint.type = BLUEPRINT_TYPE.WEAPON; swordBluePrint.name = BLUEPRINT_NAMES.Sword; swordBluePrint.required_resources = new Hashtable(); swordBluePrint.required_resources.Add(RESOURCE_NAMES.scoropionTail, 1); available.Add(swordBluePrint); BluePrints BowBluePrint = new BluePrints(); BowBluePrint.type = BLUEPRINT_TYPE.WEAPON; BowBluePrint.name = BLUEPRINT_NAMES.Bow; BowBluePrint.required_resources = new Hashtable(); BowBluePrint.required_resources.Add(RESOURCE_NAMES.scoropionTail, 1); available.Add(BowBluePrint); BluePrints whipBluePrint = new BluePrints(); whipBluePrint.type = BLUEPRINT_TYPE.WEAPON; whipBluePrint.name = BLUEPRINT_NAMES.Whip; whipBluePrint.required_resources = new Hashtable(); whipBluePrint.required_resources.Add(RESOURCE_NAMES.scoropionTail, 1); available.Add(whipBluePrint); //tools BluePrints axeBluePrint = new BluePrints(); axeBluePrint.type = BLUEPRINT_TYPE.TOOLS; axeBluePrint.name = BLUEPRINT_NAMES.Axe; axeBluePrint.required_resources = new Hashtable(); axeBluePrint.required_resources.Add(RESOURCE_NAMES.wood, 2); axeBluePrint.required_resources.Add(RESOURCE_NAMES.scoropionTail, 1); available.Add(axeBluePrint); BluePrints pickAxeBluePrint = new BluePrints(); pickAxeBluePrint.type = BLUEPRINT_TYPE.TOOLS; pickAxeBluePrint.name = BLUEPRINT_NAMES.PickAxe; pickAxeBluePrint.required_resources = new Hashtable(); pickAxeBluePrint.required_resources.Add(RESOURCE_NAMES.wood, 2); pickAxeBluePrint.required_resources.Add(RESOURCE_NAMES.scoropionTail, 1); available.Add(pickAxeBluePrint); }
/// <summary> /// Adds the entity to the configuration, assign unique bleprintid /// </summary> /// <param name="entityInstance"></param> public void AddNewEntity(IEntity entityInstance) { //Generate a new Blueprint ID, it will represent this Blue print, and must be unique ushort newId; if (BluePrints.Count == 0) { // 1-255 cube resource values (0 - air) newId = 256; } else { newId = (ushort)(BluePrints.Values.Select(x => x.BluePrintId).Max() + 1); } entityInstance.BluePrintId = newId; //entityInstance.IsSystemEntity = false; BluePrints.Add(newId, (Entity)entityInstance); }
public void AddBluePrint(BluePrints bluePrint) { bluePrintInventory.Add(bluePrint); Debug.Log(bluePrint); }
public void SetUp(BLUEPRINT_NAMES newBluePrint) { myBluePrint = AvalaibleBluePrints.available[(int)newBluePrint]; myBluePrintName = newBluePrint; }
public Manufact(BluePrints bp) { BluePrints = bp; }