private void enableWingItem(bool enable) { itemEnable = enable; if (IsMyItem()) { GameObject gameObject = GameObject.Find("Me"); if (null != gameObject) { EquipCoordinator component = gameObject.GetComponent <EquipCoordinator>(); if (component != null) { component.enableWingEffect(enable, this); } } } else { GameObject gameObject2 = BrickManManager.Instance.Get(useUserSeq); if (gameObject2 != null) { LookCoordinator component2 = gameObject2.GetComponent <LookCoordinator>(); if (component2 != null) { component2.enableWingEffect(enable, this); } } } }
private void InitializeFirstPerson() { int[] usables = new int[1] { 4 }; GameObject gameObject = GameObject.Find("Me"); if (null == gameObject) { Debug.LogError("Fail to find Me"); } else { EquipCoordinator component = gameObject.GetComponent <EquipCoordinator>(); if (null == component) { Debug.LogError("Fail to get EquipCoordinator component for Me"); } else { component.Initialize(usables); } localController = gameObject.GetComponent <LocalController>(); if (null == localController) { Debug.LogError("Fail to get LocalController component for Me"); } } }
private void VerifyLocalController() { me = GameObject.Find("Me"); if (null != me) { localController = me.GetComponent <LocalController>(); equipcoord = me.GetComponent <EquipCoordinator>(); } }
private void InitializeFirstPerson() { int[] array = null; switch (RoomManager.Instance.WeaponOption) { case 2: array = new int[2] { 0, 4 }; break; case 1: array = new int[3] { 0, 1, 4 }; break; default: array = new int[5] { 0, 2, 1, 3, 4 }; break; } me = GameObject.Find("Me"); if (null == me) { Debug.LogError("Fail to find Me"); } else { EquipCoordinator component = me.GetComponent <EquipCoordinator>(); if (null == component) { Debug.LogError("Fail to get EquipCoordinator component for Me"); } else { component.Initialize(array); } localController = me.GetComponent <LocalController>(); if (null == localController) { Debug.LogError("Fail to get LocalController component for Me"); } } }
private void TakeAwayAll() { GameObject gameObject = GameObject.Find("Me"); if (null != gameObject) { EquipCoordinator component = gameObject.GetComponent <EquipCoordinator>(); if (null != component) { component.ThrowAll(); } } }
private void OnGUI() { if (MyInfoManager.Instance.isGuiOn && !(deltaTime > showTimeLimit)) { EquipCoordinator component = GetComponent <EquipCoordinator>(); if (!(null == component) && slot2Key != null && component.CurrentWeapon < 5 && component.CurrentWeapon >= 0) { int currentWeapon = component.CurrentWeapon; int num = slot2Key[currentWeapon]; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); GUI.depth = (int)guiDepth; GUI.enabled = !DialogManager.Instance.IsModal; float num2 = 0f; for (int i = 0; i < weapons.Length; i++) { if ((key2Slot[i] != Weapon.TYPE.MODE_SPECIFIC || NeedSpecificSlot()) && null != weapons[i]) { if (i > 0) { num2 += offset; } num2 += (float)weapons[i].width / 1.5f; } } float num3 = (float)Screen.width - num2; Color color = GUI.color; for (int j = 0; j < weapons.Length; j++) { if ((key2Slot[j] != Weapon.TYPE.MODE_SPECIFIC || NeedSpecificSlot()) && null != weapons[j]) { float num4 = (float)Screen.height - (float)weapons[j].height / 1.5f - 110f; Color color2 = new Color(0.5f, 0.5f, 0.5f, 0.5f); Vector2 a = new Vector2((float)weapons[j].width / 1.5f, (float)weapons[j].height / 1.5f); if (j == num) { color2 = Color.white; a *= scale; } GUI.color = color2; TextureUtil.DrawTexture(new Rect(num3 - (a.x - (float)weapons[j].width / 1.5f) / 2f, num4 - (a.y - (float)weapons[j].height / 1.5f), a.x, a.y), weapons[j]); num3 += (float)weapons[j].width / 1.5f + offset; } } GUI.color = color; GUI.enabled = true; GUI.skin = skin; } } }
private void InitializeFirstPerson() { int[] usables = new int[1] { 4 }; GameObject gameObject = GameObject.Find("Me"); if (null == gameObject) { Debug.LogError("Fail to find Me"); } else { EquipCoordinator component = gameObject.GetComponent <EquipCoordinator>(); if (null == component) { Debug.LogError("Fail to get EquipCoordinator component for Me"); } else { component.Initialize(usables); } localController = gameObject.GetComponent <LocalController>(); if (null == localController) { Debug.LogError("Fail to get LocalController component for Me"); } else { SpawnerDesc spawner = BrickManager.Instance.GetSpawner(Brick.SPAWNER_TYPE.SINGLE_SPAWNER, 0); if (spawner != null) { localController.Spawn(spawner.position, Rot.ToQuaternion(spawner.rotation)); } else { localController.Spawn(BrickManager.Instance.GetRandomSpawnPos(), Rot.ToQuaternion((byte)Random.Range(0, 4))); } } } }
private void MakeBrickMan() { int[] array = null; switch (RoomManager.Instance.WeaponOption) { case 2: array = new int[1]; break; case 1: array = new int[2] { 0, 1 }; break; default: array = new int[4] { 0, 2, 1, 3 }; break; } if (null != me) { EquipCoordinator component = me.GetComponent <EquipCoordinator>(); if (null != component) { component.ResetWeaponOnly(array); } if (null != localController) { localController.Cure(); } } }
private void InitializeFirstPerson() { int[] array = null; int weaponOption = RoomManager.Instance.WeaponOption; array = ((weaponOption != 3) ? new int[4] { 0, 2, 1, 3 } : new int[1]); GameObject gameObject = GameObject.Find("Me"); if (null == gameObject) { Debug.LogError("Fail to find Me"); } else { EquipCoordinator component = gameObject.GetComponent <EquipCoordinator>(); if (null == component) { Debug.LogError("Fail to get EquipCoordinator component for Me"); } else { component.Initialize(array); } localController = gameObject.GetComponent <LocalController>(); if (null == localController) { Debug.LogError("Fail to get LocalController component for Me"); } } }
private void MakeZombie() { if (null != localController) { localController.CancelCannon(); } if (null != localController) { localController.CancelTrain(); } int[] usables = new int[1]; if (null != me) { EquipCoordinator component = me.GetComponent <EquipCoordinator>(); if (null != component) { component.ResetWeaponOnly(usables); } if (null != localController) { localController.Infect(); } } }
private void ResetBndStatus(bool wallRightNow) { radar.Show(!timer.IsBuildPhase); isBuilderMode = false; BrickManager.Instance.ShowTeamSpawners(timer.IsBuildPhase); if (timer.IsBuildPhase) { if (null != bndWall) { bndWall.Show(wallRightNow); } int[] usables = new int[1] { 4 }; GameObject gameObject = GameObject.Find("Me"); if (null == gameObject) { Debug.LogError("Fail to find Me"); } else { EquipCoordinator component = gameObject.GetComponent <EquipCoordinator>(); if (null == component) { Debug.LogError("Fail to get EquipCoordinator component for Me"); } else { component.Reinit(usables); } } } else { if (null != bndWall) { bndWall.Hide(wallRightNow); } int[] array = null; switch (RoomManager.Instance.WeaponOption) { case 2: array = ((BuildOption.Instance.AllowBuildGunInDestroyPhase() || !RoomManager.Instance.UseBuildGun) ? new int[2] { 0, 4 } : new int[1]); break; case 1: array = ((BuildOption.Instance.AllowBuildGunInDestroyPhase() || !RoomManager.Instance.UseBuildGun) ? new int[3] { 0, 1, 4 } : new int[2] { 0, 1 }); break; default: array = ((BuildOption.Instance.AllowBuildGunInDestroyPhase() || !RoomManager.Instance.UseBuildGun) ? new int[5] { 0, 2, 1, 3, 4 } : new int[4] { 0, 2, 1, 3 }); break; } GameObject gameObject2 = GameObject.Find("Me"); if (null == gameObject2) { Debug.LogError("Fail to find Me"); } else { EquipCoordinator component2 = gameObject2.GetComponent <EquipCoordinator>(); if (null == component2) { Debug.LogError("Fail to get EquipCoordinator component for Me"); } else { component2.ResetWeaponOnly(array); } } } }