|
|
@@ -18,7 +18,7 @@ export class BulletTrailController extends Component {
|
|
|
private trailConfig = {
|
|
|
fadeTime: 0.5, // 拖尾消失时间
|
|
|
minSeg: 1, // 最小分段
|
|
|
- stroke: 10, // 拖尾宽度
|
|
|
+ stroke: 30, // 拖尾宽度
|
|
|
fastMode: false // 快速模式
|
|
|
};
|
|
|
|
|
|
@@ -149,46 +149,7 @@ export class BulletTrailController extends Component {
|
|
|
this.motionStreak.reset();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- /**
|
|
|
- * 根据武器类型配置拖尾效果
|
|
|
- * @param weaponType 武器类型
|
|
|
- */
|
|
|
- public configureTrailByWeaponType(weaponType: string) {
|
|
|
- switch (weaponType) {
|
|
|
- case 'pea_shooter':
|
|
|
- this.setTrailColor('white');
|
|
|
- this.setTrailWidth(8);
|
|
|
- this.setTrailFadeTime(0.3);
|
|
|
- break;
|
|
|
- case 'fire_shooter':
|
|
|
- this.setTrailColor('fire');
|
|
|
- this.setTrailWidth(12);
|
|
|
- this.setTrailFadeTime(0.5);
|
|
|
- break;
|
|
|
- case 'ice_shooter':
|
|
|
- this.setTrailColor('ice');
|
|
|
- this.setTrailWidth(10);
|
|
|
- this.setTrailFadeTime(0.4);
|
|
|
- break;
|
|
|
- case 'poison_shooter':
|
|
|
- this.setTrailColor('poison');
|
|
|
- this.setTrailWidth(9);
|
|
|
- this.setTrailFadeTime(0.6);
|
|
|
- break;
|
|
|
- case 'electric_shooter':
|
|
|
- this.setTrailColor('electric');
|
|
|
- this.setTrailWidth(11);
|
|
|
- this.setTrailFadeTime(0.2);
|
|
|
- break;
|
|
|
- default:
|
|
|
- this.setTrailColor('white');
|
|
|
- this.setTrailWidth(10);
|
|
|
- this.setTrailFadeTime(0.5);
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
onDestroy() {
|
|
|
// 清理资源
|
|
|
this.motionStreak = null;
|