|
@@ -2,6 +2,7 @@
|
|
import Joystick_mag, { SpeedType } from "../../../joystick/Joystick_mag";
|
|
import Joystick_mag, { SpeedType } from "../../../joystick/Joystick_mag";
|
|
import { FFAttr } from "../../data/FFCalAttr";
|
|
import { FFAttr } from "../../data/FFCalAttr";
|
|
import { __SkillData } from "../../data/sdata/SManage";
|
|
import { __SkillData } from "../../data/sdata/SManage";
|
|
|
|
+import { SpeedUpDirection } from "../../element/JG0115";
|
|
import BObject from "../bullet/BObject";
|
|
import BObject from "../bullet/BObject";
|
|
import FSprite, { SpriteActionType } from "./FSprite";
|
|
import FSprite, { SpriteActionType } from "./FSprite";
|
|
import MBomb from "./skill/mainSkill/MBomb";
|
|
import MBomb from "./skill/mainSkill/MBomb";
|
|
@@ -34,9 +35,14 @@ export default class MSprite extends FSprite {
|
|
/**
|
|
/**
|
|
* 移动速度
|
|
* 移动速度
|
|
*/
|
|
*/
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+ private speedN = 120000;
|
|
|
|
+ public speedUp: string = "";
|
|
|
|
+=======
|
|
private speedN = 80000;
|
|
private speedN = 80000;
|
|
|
|
+>>>>>>> 05c7557fd359051ba5c907802c1d34a511f5f6c4
|
|
|
|
|
|
- public start(){
|
|
|
|
|
|
+ public start() {
|
|
super.start()
|
|
super.start()
|
|
this.spineEventListener()
|
|
this.spineEventListener()
|
|
}
|
|
}
|
|
@@ -95,6 +101,7 @@ export default class MSprite extends FSprite {
|
|
if (this.gamePause) {
|
|
if (this.gamePause) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ if (this.speedUp != "") return
|
|
if (this.isWalk) {
|
|
if (this.isWalk) {
|
|
this.mRigidBody.applyLinearImpulse(
|
|
this.mRigidBody.applyLinearImpulse(
|
|
cc.v2(this.moveV2.x * this.speedN * dt, this.moveV2.y * this.speedN * dt),
|
|
cc.v2(this.moveV2.x * this.speedN * dt, this.moveV2.y * this.speedN * dt),
|
|
@@ -116,14 +123,14 @@ export default class MSprite extends FSprite {
|
|
this.moveV2 = v2;
|
|
this.moveV2 = v2;
|
|
//有怪物的时候,面向怪物
|
|
//有怪物的时候,面向怪物
|
|
let enemy = this.findEnemy(2000);
|
|
let enemy = this.findEnemy(2000);
|
|
- if(enemy.sprite){
|
|
|
|
|
|
+ if (enemy.sprite) {
|
|
let abs = Math.abs(this.spine.node.scaleX);
|
|
let abs = Math.abs(this.spine.node.scaleX);
|
|
- if(this.node.x > enemy.sprite.node.x){
|
|
|
|
|
|
+ if (this.node.x > enemy.sprite.node.x) {
|
|
this.spine.node.scaleX = -abs;
|
|
this.spine.node.scaleX = -abs;
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
this.spine.node.scaleX = abs;
|
|
this.spine.node.scaleX = abs;
|
|
}
|
|
}
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
let abs = Math.abs(this.spine.node.scaleX);
|
|
let abs = Math.abs(this.spine.node.scaleX);
|
|
if (v2.x <= 0.001 && v2.x >= -0.001) {
|
|
if (v2.x <= 0.001 && v2.x >= -0.001) {
|
|
} else if (v2.x > 0) {
|
|
} else if (v2.x > 0) {
|
|
@@ -131,6 +138,16 @@ export default class MSprite extends FSprite {
|
|
} else {
|
|
} else {
|
|
this.spine.node.scaleX = -abs;
|
|
this.spine.node.scaleX = -abs;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (this.speedUp != "") {
|
|
|
|
+ if (this.speedUp == SpeedUpDirection.Left) {
|
|
|
|
+ this.spine.node.scaleX = -Math.abs(this.spine.node.scaleX);
|
|
|
|
+ } else {
|
|
|
|
+ this.spine.node.scaleX = Math.abs(this.spine.node.scaleX);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -226,7 +243,7 @@ export default class MSprite extends FSprite {
|
|
*/
|
|
*/
|
|
private endShooting() {
|
|
private endShooting() {
|
|
this.currentShooting = false;
|
|
this.currentShooting = false;
|
|
- if(this.mWeapon1){
|
|
|
|
|
|
+ if (this.mWeapon1) {
|
|
this.mWeapon1.rotation = 180;
|
|
this.mWeapon1.rotation = 180;
|
|
}
|
|
}
|
|
if (this.isWalk) {
|
|
if (this.isWalk) {
|