mirror of
https://github.com/MartinKral/Slash-The-Hordes
synced 2025-01-13 14:31:34 +00:00
20 lines
444 B
TypeScript
20 lines
444 B
TypeScript
import { BoxCollider2D, Component, _decorator } from "cc";
|
|
const { ccclass, property } = _decorator;
|
|
|
|
@ccclass("Enemy")
|
|
export class Enemy extends Component implements IDamageDealing {
|
|
@property(BoxCollider2D) public collider: BoxCollider2D;
|
|
|
|
public get Collider(): BoxCollider2D {
|
|
return this.collider;
|
|
}
|
|
|
|
public get Damage(): number {
|
|
return 3;
|
|
}
|
|
}
|
|
|
|
export interface IDamageDealing {
|
|
Damage: number;
|
|
}
|