Я хочу показать оба глаза, но в это время не появляется. Есть ли решение для этого, у меня проблема с родителем, который в настоящее время все еще зависит от другого, я хочу, чтобы родитель оставался в одиночестве, без придерживаясь другого, так что оба глаза могут появиться, так что на данный момент два глаза не появляются, как хотелось бы,
create(): void {
this.add.image(400, 300, 'sky');
this.balls = this.generateBalls();
this.dance = this.generateDance();
// this.playerEyes = new Eye(this.generateEyeArg(200,135,3.0));
this.inputA = this.generateEyeArg( 340, 300, 3.0 );
this.inputB = this.generateEyeArg( 460, 300, 3.0 );
this.charactorA = new Eye( this.inputA );
this.charactorB = new Eye( this.inputB );
// console.log("gameObject", this.charactorA);
}
generateEyeArg( xCoor: number, yCoor: number, sScale: number) {
return {
scene : this,
parent : this,
target : new Cursor( this ), // game.input.mousePointer,
x : xCoor, // x, y position is the location that the eyes
y : yCoor, // object is originally located within the parent
width : 10, // height/width is the total area of the eye object (subject to scaling)
height : 8,
w2h : 0.9, // Eye ball width to height ratio
scale : sScale,
eyeSpacing : 3.5, // Distance between eyes
pupilScale : 1.0,
pupilRotRadius : 0.7, // Factor of radius pupils can rotate around eye white
pupilColor : 0x0f00ff
};
}