|
@@ -359,12 +359,11 @@ export class TornadoComponent extends Component {
|
|
//体积=基础体积×(1+等级×百分比)
|
|
//体积=基础体积×(1+等级×百分比)
|
|
const baseSize = 1;
|
|
const baseSize = 1;
|
|
const growMultiple = AttributeBonusMgr.inst.userModel.game_lv_modleVolume_up; //升级体积 百分比系数
|
|
const growMultiple = AttributeBonusMgr.inst.userModel.game_lv_modleVolume_up; //升级体积 百分比系数
|
|
- const percentage = growMultiple / 100;
|
|
|
|
- const growSize = baseSize + (1 + this.currentLv * percentage);
|
|
|
|
|
|
+ const percentage = (growMultiple / 100).toFixed(1);
|
|
|
|
+ const growSize = baseSize + (1 + this.currentLv * Number(percentage));
|
|
// this.node.setScale(growSize, growSize, growSize);
|
|
// this.node.setScale(growSize, growSize, growSize);
|
|
this.particleSystem.startSizeX.constantMax += 1;
|
|
this.particleSystem.startSizeX.constantMax += 1;
|
|
this.particleSystem.startLifetime.constantMax += 0.2;
|
|
this.particleSystem.startLifetime.constantMax += 0.2;
|
|
-
|
|
|
|
this.onGambitEffect();
|
|
this.onGambitEffect();
|
|
// console.log('growSize:', growSize);
|
|
// console.log('growSize:', growSize);
|
|
this.updateCameraView();
|
|
this.updateCameraView();
|
|
@@ -373,13 +372,14 @@ export class TornadoComponent extends Component {
|
|
//刚体扩大特效
|
|
//刚体扩大特效
|
|
private onGambitEffect() {
|
|
private onGambitEffect() {
|
|
const multiple: number = AttributeBonusMgr.inst.userModel.game_tornado_damage;
|
|
const multiple: number = AttributeBonusMgr.inst.userModel.game_tornado_damage;
|
|
- const scaleFactor = multiple / 100;
|
|
|
|
|
|
+ const scaleFactor = Number((multiple / 100).toFixed(1));
|
|
const size = this.tigger.size;
|
|
const size = this.tigger.size;
|
|
this.tigger.size = new Vec3(size.x + size.x * scaleFactor, size.y + size.y * scaleFactor, size.z + size.z * scaleFactor);
|
|
this.tigger.size = new Vec3(size.x + size.x * scaleFactor, size.y + size.y * scaleFactor, size.z + size.z * scaleFactor);
|
|
- console.log('tigger size:', this.tigger.size);
|
|
|
|
|
|
+ console.log('tigger size:', this.tigger.size, 'scaleFactor:', scaleFactor);
|
|
}
|
|
}
|
|
|
|
|
|
private updateCameraView() {
|
|
private updateCameraView() {
|
|
|
|
+ if (this.ai) return;
|
|
const sence = director.getScene();
|
|
const sence = director.getScene();
|
|
const view = 30 + this.currentLv * 2;
|
|
const view = 30 + this.currentLv * 2;
|
|
// console.log(`视野范围:${view}`);
|
|
// console.log(`视野范围:${view}`);
|