public InventoryState(EntityMaintenanceSystem emSys, StatsSystem sS, GearSystem gS, StatModifierSystem mS, ItemInventorySystem iS, StateMachine sM, NameSystem nSys) { entMaintenanceSystem = emSys; gearSystem = gS; statsSystem = sS; modifierSystem = mS; inventorySystem = iS; nameSystem = nSys; stateSystem = sM; }
public void DoSomething(GearSystem gearSystem, bool notifyOthers) { switch (gearSystem.name) { case "MaquinaEngranajeA": HandleGearSystemA(gearSystem, notifyOthers); break; case "MaquinaEngranajeB": HandleGearSystemB(gearSystem, notifyOthers); break; case "MaquinaEngranajeC": HandleGearSystemC(gearSystem, notifyOthers); break; case "MaquinaEngranajeD": HandleGearSystemD(gearSystem, notifyOthers); break; case "MaquinaEngranajeE": HandleGearSystemE(gearSystem, notifyOthers); break; case "MaquinaEngranajeF": HandleGearSystemF(gearSystem, notifyOthers); break; case "MaquinaEngranajeG": HandleGearSystemG(gearSystem, notifyOthers); break; case "MaquinaEngranajeH": HandleGearSystemH(gearSystem, notifyOthers); break; case "MaquinaEngranajeI": HandleGearSystemI(gearSystem, notifyOthers); break; case "MaquinaEngranajeJ": HandleGearSystemJ(gearSystem, notifyOthers); break; case "MaquinaEngranajeK": HandleGearSystemK(gearSystem, notifyOthers); break; case "MaquinaEngranajeL": HandleGearSystemL(gearSystem, notifyOthers); break; } }
private void HandleGearSystemB(GearSystem gearSystem, bool notifyOthers) { // Dispose every used gear in case of reconnection for (int i = 0; i < gearSystem.components.Length; i++) { string usedGearName = gearSystem.components[i].sprite.name; GameObject usedGear = GameObject.Find(usedGearName); if (usedGear) { DestroyObject(usedGearName, .1f); } } // Hide every placed gear SpriteRenderer[] componentSlots = gearSystem.GetComponentsInChildren <SpriteRenderer>(); for (int i = 0; i < componentSlots.Length; i++) { componentSlots[i].sprite = null; } // Change the gearsystem sprite SpriteRenderer systemSpriteRenderer = gearSystem.GetComponent <SpriteRenderer>(); systemSpriteRenderer.sprite = gearSystem.activatedSprite; // Doing Something SetAnimatorBool("startMoving", true, gearSystem); OneTimeMovingObject altarEngin1 = GameObject.Find("AltarEnginMovable").GetComponent <OneTimeMovingObject>(); altarEngin1.move = true; DestroyObject("ActivateNPCForGear", .1f); // Planner if (Object.FindObjectOfType <Planner>()) { if (gearSystem.switchObj) { gearSystem.switchObj.ActivateSwitch(); Planner planner = Object.FindObjectOfType <Planner>(); planner.Monitor(); } } if (notifyOthers) { SendMessageToServer("ActivateSystem/" + gearSystem.name, true); } }
private void HandleGearSystemL(GearSystem gearSystem, bool notifyOthers) { // Dispose every used gear in case of reconnection for (int i = 0; i < gearSystem.components.Length; i++) { string usedGearName = gearSystem.components[i].sprite.name; GameObject usedGear = GameObject.Find(usedGearName); if (usedGear) { DestroyObject(usedGearName, .1f); } } // Hide every placed gear SpriteRenderer[] componentSlots = gearSystem.GetComponentsInChildren <SpriteRenderer>(); for (int i = 0; i < componentSlots.Length; i++) { componentSlots[i].sprite = null; } // Change the gearsystem sprite SpriteRenderer systemSpriteRenderer = gearSystem.GetComponent <SpriteRenderer>(); systemSpriteRenderer.sprite = gearSystem.activatedSprite; // Doing Something BubbleRotatingInstantiator bInstantiatior = GameObject.Find("BubbleCentralInstatiator").GetComponent <BubbleRotatingInstantiator>(); bInstantiatior.GearActivation(); // Planner if (Object.FindObjectOfType <Planner>()) { if (gearSystem.switchObj) { gearSystem.switchObj.ActivateSwitch(); Planner planner = Object.FindObjectOfType <Planner>(); planner.Monitor(); } } if (notifyOthers) { SendMessageToServer("ActivateSystem/" + gearSystem.name, true); } }
public EntityMaintenanceSystem(EffectSystem eSys, EntityManager eMan, EquipmentSystem eqSys, ExperienceSystem xSys, GearSystem gSys, ItemInventorySystem invSys, ItemSystem iSys, NameSystem nSys, PlayerSystem pSys, ProfessionSystem profSys, StatsSystem sSys, StatModifierSystem smSys) { effectSystem = eSys; entityManager = eMan; equipmentSystem = eqSys; experienceSystem = xSys; gearSystem = gSys; inventorySystem=invSys; itemSystem = iSys; nameSystem = nSys; playerSystem = pSys; professionSystem = profSys; statsSystem = sSys; modifierSystem = smSys; }
public ShopState(EntityMaintenanceSystem eMS, GearSystem gSys, StatModifierSystem sMSys, StatsSystem sSys, ExperienceSystem eSys, PlayerSystem pSys, DropSystem dSys, NameSystem nSys, StateMachine sMach, ItemSystem iSys, GameMap gMap) { entMaintenanceSystem = eMS; gearSystem = gSys; modifierSystem = sMSys; statsSystem = sSys; experienceSystem = eSys; playerSystem = pSys; dropSystem=dSys; nameSystem = nSys; itemSystem = iSys; stateSystem = sMach; gameMap = gMap; NumItems = 5; }
public EntityManager(StateMachine sMach, DropSystem dSys, PlayerSystem pS, StatsSystem sS, ItemSystem iS, StatModifierSystem mS, EffectSystem efS, EquipmentSystem eqS, AISystem aiS, GearSystem gS, ExperienceSystem xS, ItemInventorySystem invS, NameSystem nS, ProfessionSystem profS, ActionSystem actS, ActionInventorySystem aInvS, CombatSystem cSys, EntityMaintenanceSystem eMS) { stateSystem = sMach; dropSystem = dSys; entMaintenanceSystem = eMS; aInventorySystem = aInvS; combatSystem = cSys; playerSystem = pS; statsSystem = sS; itemSystem = iS; modifierSystem = mS; effectSystem = efS; equipmentSystem = eqS; aiSystem = aiS; gearSystem = gS; experienceSystem = xS; inventorySystem = invS; nameSystem = nS; professionSystem = profS; actionSystem = actS; }
private void HandleGearSystemA(GearSystem gearSystem, bool notifyOthers) { // Dispose every used gear in case of reconnection for (int i = 0; i < gearSystem.components.Length; i++) { string usedGearName = gearSystem.components[i].sprite.name; GameObject usedGear = GameObject.Find(usedGearName); if (usedGear) { DestroyObject(usedGearName, .1f); } } // Hide every placed gear SpriteRenderer[] componentSlots = gearSystem.GetComponentsInChildren <SpriteRenderer>(); for (int i = 0; i < componentSlots.Length; i++) { componentSlots[i].sprite = null; } // Change the gearsystem sprite SpriteRenderer systemSpriteRenderer = gearSystem.GetComponent <SpriteRenderer>(); systemSpriteRenderer.sprite = gearSystem.activatedSprite; gearSystem.ToggleParticles(true); SetAnimatorBool("startMoving", true, gearSystem); GameObject secondMachine = GameObject.Find("MaqEngranaje2"); if (secondMachine) { ActivableSystem secondGear = secondMachine.GetComponent <ActivableSystem>(); SetAnimatorBool("startMoving", true, secondGear); } MoveTowardsAndDie blocksMover = GameObject.Find("GiantBlockers").GetComponent <MoveTowardsAndDie>(); blocksMover.StartMoving(gearSystem.GetParticles()); if (notifyOthers) { SetAnimatorBool("startMovingMachine", false, gearSystem, 2f); } if (Object.FindObjectOfType <Planner>()) { if (gearSystem.switchObj) { gearSystem.switchObj.ActivateSwitch(); Planner planner = Object.FindObjectOfType <Planner>(); planner.Monitor(); } } if (notifyOthers) { SendMessageToServer("ObstacleDestroyed/GiantBlockers", true); SendMessageToServer("ActivateSystem/" + gearSystem.name, true); } }
private void InitializeSystems() { Console.WriteLine("Initializing Game Systems"); professionSystem = new ProfessionSystem(); effectSystem=new EffectSystem(lua); equipmentSystem = new EquipmentSystem(); experienceSystem = new ExperienceSystem(); itemSystem = new ItemSystem(); inventorySystem = new ItemInventorySystem(); modifierSystem = new StatModifierSystem(); nameSystem = new NameSystem(lua); playerSystem = new PlayerSystem(nameSystem, stateSystem); gearSystem = new GearSystem(); statsSystem = new StatsSystem(); aInventorySystem = new ActionInventorySystem(lua, statsSystem); actionSystem = new ActionSystem(lua); aiSystem = new AISystem(); dropSystem = new DropSystem(dropMap); }