public void UseSpecial(Item.Weapon weaponType) { switch (weaponType) { // Have character do whatever animation is associated with their sprite // Add animation here case Item.Weapon.None: break; case Item.Weapon.Axe: break; case Item.Weapon.Shovel: break; case Item.Weapon.Sword: break; case Item.Weapon.Whip: break; } // And also tell the WeaponController animate weaponHand.UseSpecial(weaponType); }
public void UseWeapon(Item.Weapon weaponType) { switch (weaponType) { case Item.Weapon.None: case Item.Weapon.Axe: case Item.Weapon.Shovel: case Item.Weapon.Sword: case Item.Weapon.Whip: SwingSword(); break; } }
public void UseWeapon(Item.Weapon weaponType) { // Different animations for different weapons switch (weaponType) { // Set of "swordlike" animations case Item.Weapon.Axe: case Item.Weapon.Shovel: case Item.Weapon.Sword: // Have character do whatever animation is associated with their sprite // Add animation here break; } // Delegate to weapon hand to handle each weapon as it sees fit. weaponHand.UseWeapon(weaponType); }
public void UseSpecial(Item.Weapon weaponType) { switch (weaponType) { case Item.Weapon.None: case Item.Weapon.Axe: case Item.Weapon.Shovel: case Item.Weapon.Sword: case Item.Weapon.Whip: if (specialAttackTimer >= SPECIAL_ATTACK_COOLDOWN && AttemptToMakeRope()) { specialAttackTimer = 0f; player.GrabRope(); } break; } }