void DecideWarrior() { if (hasAuthority) { WarriorNum = 0; if (PetWarrior.GoatWarrior) { WarriorNum = 1; if (liveText.text == "20/20") { StartCoroutine(Check()); } } else if (PetWarrior.CatWarrior) { WarriorNum = 2; SpawnManager.AllowDodge(); WarriorIconNum = 1; } else if (PetWarrior.PigWarrior) { WarriorNum = 3; SpawnManager.AllowAddLife(); WarriorIconNum = 2; } else if (PetWarrior.BearCatWarrior) { WarriorNum = 4; SpawnManager.AllowBearCat(); } else if (PetWarrior.ChickenWarrior) { WarriorNum = 5; SpawnManager.AllowChicken(); // CanFly = true; // NetPlayer.CmdOpenAnimate(this.GetComponent<NetworkIdentity>().netId); // for owl } else if (PetWarrior.HorseWarrior) { SpawnManager.AllowSpeedUp(); WarriorNum = 6; WarriorIconNum = 3; } else if (PetWarrior.LorisWarrior) { WarriorNum = 7; SpawnManager.AllowDoubleDamage(); WarriorIconNum = 4; } else if (PetWarrior.OwlWarrior) { WarriorNum = 8; CanFly = true; NetPlayer.CmdOpenAnimate(this.GetComponent <NetworkIdentity>().netId, PetWarrior.isUpgrade); } else if (PetWarrior.ChameleonWarrior) { WarriorNum = 9; SpawnManager.AllowAvoidExplode(); WarriorIconNum = 5; } else if (PetWarrior.TurtleWarrior) { WarriorNum = 10; SpawnManager.AllowGuard(); WarriorIconNum = 6; } if (WarriorNum != 0) { NetPlayer.CmdChangeWarrior(this.GetComponent <NetworkIdentity>().netId, WarriorNum, PetWarrior.isUpgrade); } else { NetPlayer.CmdSetPlayerImg(this.GetComponent <NetworkIdentity>().netId, PlayerData.CharacterNum); } } }