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 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); } } } }