提交新模式

This commit is contained in:
PC-20230316NUNE\Administrator
2023-12-14 19:16:28 +08:00
parent 8fcc85a054
commit 9a3f666df1
12 changed files with 221 additions and 233 deletions

View File

@@ -28,8 +28,8 @@ export default class GFSMDefault extends GFSMBase{
}
//锁定的敌人
_enemy:() => GRoleDefault;
get enemy():GRoleDefault{
_enemy:() => GRoleBase<{}>;
get enemy():GRoleBase<{}>{
if(this._enemy)
return this._enemy();
return null;
@@ -76,7 +76,7 @@ export default class GFSMDefault extends GFSMBase{
//寻敌
onSeekEnemy(): GRoleDefault {
onSeekEnemy(): GRoleBase<{}> {
return this.player.onQueryEunmy();
}

View File

@@ -142,13 +142,19 @@ export default class GRoleDefault extends GRoleBase<{}>{
let vWorld = this.node.worldPosition;
let vEndWorld = this.getWorldBackLen(v2(1500,500));
this.JTween(vWorld)
.to({x:vEndWorld.x},1000)
.onUpdate(pos => this.node.worldPosition = pos)
.to({x:vEndWorld.x},1200)
.onUpdate(pos => {
if(this.node.isValid)
this.node.worldPosition = pos;
})
.start();
this.JTween(vWorld)
.to({y:vEndWorld.y},1000)
.to({y:vEndWorld.y},1200)
.easing(JEasing.Circular.Out)
.onUpdate(pos => this.node.worldPosition = vWorld)
.onUpdate(pos => {
if(this.node.isValid)
this.node.worldPosition = vWorld
})
.start();
}
@@ -208,7 +214,7 @@ export default class GRoleDefault extends GRoleBase<{}>{
return false;
}
onQueryEunmy():GRoleDefault{
onQueryEunmy():GRoleBase<{}>{
return null;
}