public void SwitchSword() { OriginalSword.SetActive(!OriginalSword.activeSelf); NewSword.SetActive(!NewSword.activeSelf); swordType = !swordType; anim.SetBool("SpellType", swordType); }
public async Task <Item> CreateSword([FromBody] NewSword sword, Guid playerId) { DateTime localDate = DateTime.UtcNow; int ownerLvl = await repo.GetPlayerLevel(playerId); Sword new_sword = new Sword(); LevelValidator validator = new LevelValidator(); new_sword.Id = Guid.NewGuid(); new_sword.OwnerLevel = ownerLvl; new_sword.Level = 1; new_sword.SwordType = sword.SwordType; validator.ValidateAndThrow(new_sword); await repo.CreateSword(playerId, new_sword); return(new_sword); }