refactor(hero): 优化英雄缩放逻辑和位置配置
重构英雄缩放逻辑,使用统一的缩放计算方法替代硬编码值 调整英雄和怪物的初始位置坐标 在Hero和Monster类中添加size变量控制缩放
This commit is contained in:
@@ -81,8 +81,8 @@ export class HeroViewComp extends CCComp {
|
||||
this.initUINodes();
|
||||
|
||||
/** 方向 */
|
||||
this.node.setScale(this.scale,1);
|
||||
this.top_node.setScale(this.scale,1);
|
||||
this.node.setScale(this.scale*this.node.scale.x,1*this.node.scale.y);
|
||||
this.top_node.setScale(this.scale*this.top_node.scale.x,1*this.top_node.scale.y);
|
||||
// if(this.model && this.model.is_boss){
|
||||
// this.top_node.position=v3(this.node.position.x,this.node.position.y+70,0)
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user