Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void changeWeapon(bool up)
- {
- int weaponIndex = (int)character.weapon;
- if (up)
- {
- weaponIndex++;
- if (weaponIndex >= Enum.GetNames(typeof(Weapon)).Length)
- weaponIndex = 0;
- }
- else
- {
- weaponIndex--;
- if (weaponIndex < 0)
- weaponIndex = Enum.GetNames(typeof(Weapon)).Length -1;
- }
- if (character.charClass == ClassType.Swordsman) {
- //character.weapon = swordWeapons
- } else if (character.charClass == ClassType.Marksman) {
- } else {
- }
- character.weapon = (Weapon)weaponIndex;
- weapon.text = character.weapon + "";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement