mirror of
https://github.com/MartinKral/Slash-The-Hordes
synced 2024-12-25 11:18:54 +00:00
Xp anim
This commit is contained in:
parent
2105682fd9
commit
54167ec528
@ -342,6 +342,9 @@
|
||||
"__prefab": {
|
||||
"__id__": 17
|
||||
},
|
||||
"animation": {
|
||||
"__id__": 18
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
|
@ -1,10 +1,12 @@
|
||||
import { Component, Vec3, _decorator } from "cc";
|
||||
import { Animation, Component, Vec3, _decorator } from "cc";
|
||||
import { ISignal } from "../../Services/EventSystem/ISignal";
|
||||
import { Signal } from "../../Services/EventSystem/Signal";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass("XP")
|
||||
export class XP extends Component {
|
||||
@property(Animation) private animation: Animation;
|
||||
|
||||
private pickUpEvent: Signal<XP> = new Signal<XP>();
|
||||
private value = 2;
|
||||
|
||||
@ -12,6 +14,7 @@ export class XP extends Component {
|
||||
this.node.setWorldPosition(position);
|
||||
this.value = value;
|
||||
this.node.active = true;
|
||||
this.animation.play("DropStart");
|
||||
}
|
||||
|
||||
public get Value(): number {
|
||||
|
Loading…
Reference in New Issue
Block a user