dd
This commit is contained in:
@@ -32,7 +32,9 @@ export class Skill extends ecs.Entity {
|
||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||
var node = instantiate(prefab);
|
||||
node.parent = parent;
|
||||
node.setScale(scale,1)
|
||||
node.setPosition(pos)
|
||||
|
||||
var sv = node.getComponent(SkillCom)!;
|
||||
sv.speed = speed;
|
||||
sv.range = range;
|
||||
|
||||
@@ -20,6 +20,7 @@ export class SkillCom extends CCComp {
|
||||
atk:number = 10;
|
||||
is_destroy:boolean = false;
|
||||
start() {
|
||||
this.node.active=true
|
||||
let collider = this.getComponent(Collider2D);
|
||||
if (collider) {
|
||||
// collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
|
||||
|
||||
Reference in New Issue
Block a user