Weapon_big.ts 662 B

1234567891011121314151617181920212223242526272829
  1. import Weapon from "./Weapon";
  2. import { WeaponType } from "./WeaponType";
  3. const {ccclass, property} = cc._decorator;
  4. @ccclass
  5. export default class Weapon_big extends Weapon {
  6. protected onLoad(): void {
  7. super.onLoad();
  8. this.weaponType = WeaponType.hold;
  9. }
  10. protected get handAnim(): string {
  11. if (this.weaponType == WeaponType.hold) {
  12. return "holdInHero_full";
  13. } else {
  14. return "holdInHero";
  15. }
  16. }
  17. protected get dropAnim(): string {
  18. if (this.weaponType == WeaponType.hold) {
  19. return "drop_full";
  20. } else {
  21. return "drop";
  22. }
  23. }
  24. }