mirror of
https://github.com/MartinKral/Slash-The-Hordes
synced 2025-11-13 09:38:09 +00:00
Item refactoring
This commit is contained in:
14
assets/Scripts/Game/Items/XP.ts
Normal file
14
assets/Scripts/Game/Items/XP.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Animation, Vec3, _decorator } from "cc";
|
||||
import { Item } from "./Item";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass("XP")
|
||||
export class XP extends Item {
|
||||
@property(Animation) private animation: Animation;
|
||||
|
||||
public setup(position: Vec3): void {
|
||||
super.setup(position);
|
||||
this.animation.play("DropStart");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user