refactoring
This commit is contained in:
@@ -12,8 +12,8 @@ class TextObject {
|
|||||||
txt.maxWidth = obj.width;
|
txt.maxWidth = obj.width;
|
||||||
txt.textAlign = 'center';
|
txt.textAlign = 'center';
|
||||||
txt.font = obj.fontPath;
|
txt.font = obj.fontPath;
|
||||||
txt.anchorX = 'center';
|
txt.anchorX = obj.anchorX || 'center';
|
||||||
txt.anchorY = 'bottom';
|
txt.anchorY = obj.anchorY || 'bottom';
|
||||||
txt.curveRadius = 0;
|
txt.curveRadius = 0;
|
||||||
txt.outlineColor = 0xffffff;
|
txt.outlineColor = 0xffffff;
|
||||||
txt.outlineWidth = '15%';
|
txt.outlineWidth = '15%';
|
||||||
|
|||||||
@@ -168,8 +168,7 @@ export default {
|
|||||||
gameEngine.activeObjects.add(io.object);
|
gameEngine.activeObjects.add(io.object);
|
||||||
if (this.env != 'GameDesigner'){
|
if (this.env != 'GameDesigner'){
|
||||||
if (i.data.$go?.type == 'player3d'){
|
if (i.data.$go?.type == 'player3d'){
|
||||||
let hero = new Hero(io, i.data.$go);
|
let hero = new Hero(gameEngine, io, i.data.$go);
|
||||||
hero.init(gameEngine);
|
|
||||||
}else{
|
}else{
|
||||||
if (io.source?.animations?.length){
|
if (io.source?.animations?.length){
|
||||||
gameEngine.playAnimation(gameEngine.scene, io.source.animations[0]);
|
gameEngine.playAnimation(gameEngine.scene, io.source.animations[0]);
|
||||||
|
|||||||
Reference in New Issue
Block a user