private void HandlerGroup52() { GameObject bInstantiator = GameObject.Find("BubbleExitUp"); if (bInstantiator) { BubbleRotatingInstantiator bIController = bInstantiator.GetComponent <BubbleRotatingInstantiator>(); bIController.GearActivation(); } GameObject kZone = GameObject.Find("KillZoneForAll"); if (kZone) { Destroy(kZone); } GameObject kZoneFB = GameObject.Find("ActivateNPCKillingObject"); if (kZoneFB) { Destroy(kZoneFB); } levelManager.InstantiatePrefab("Exp/ExpFeedback35", new Vector2(-32.05f, 7.68f)); levelManager.InstantiatePrefab("Exp/ExpFeedback35", new Vector2(-32.05f, 7.05f)); levelManager.InstantiatePrefab("Exp/ExpFeedback35", new Vector2(-32.80f, 7.33f)); levelManager.InstantiatePrefab("Exp/ExpFeedback35", new Vector2(-31.30f, 7.33f)); // This one is for the group of Switches in the warriorGearZone; }
private void HandlerGroup56() ////Unlocks BubbleInstantiator in Zone 1 for Mage +Exp: Check { BubbleRotatingInstantiator bInstantiator = GameObject.Find("BubbleInstantiatorMageZone").GetComponent <BubbleRotatingInstantiator>(); bInstantiator.GearActivation(); levelManager.InstantiatePrefab("Exp/ExpFeedback35", new Vector2(-46.19f, -4.47f)); levelManager.InstantiatePrefab("Exp/ExpFeedback35", new Vector2(-44.69f, -4.47f)); }
private void HandlerBubbleInstantiatorData(string[] msg) { if (NotInClientScene()) { string bubbleInstantiatorName = msg[1]; GameObject bubbleSystem = GameObject.Find(bubbleInstantiatorName); if (bubbleSystem) { BubbleRotatingInstantiator bInstantiator = bubbleSystem.GetComponent <BubbleRotatingInstantiator>(); bInstantiator.HandleBubbleInstantiatorData(msg); } } }
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); } }