feat: expand campaign and refine puzzle visuals and controls
This commit is contained in:
@@ -31,7 +31,7 @@ class CocosPainter {
|
||||
return new Color((rgb >> 16) & 255, (rgb >> 8) & 255, rgb & 255, alpha);
|
||||
}
|
||||
sprite(index: number, x: number, y: number, radius: number) {
|
||||
if (!this.frames.length) return false;
|
||||
if (!this.frames[index]) return false;
|
||||
if (!this.pool[this.cursor]) {
|
||||
const node = new Node('Tile'); node.layer = this.root.layer; node.parent = this.root;
|
||||
node.addComponent(UITransform);const mask=node.addComponent(Mask);mask.type=Mask.Type.GRAPHICS_STENCIL;
|
||||
@@ -94,7 +94,7 @@ export class HexTrailsBoard extends Component {
|
||||
this.painter = new CocosPainter(this.node,graphics,arrowGraphics,ui.width,ui.height,this.tileAtlas);
|
||||
this.node.on(Node.EventType.TOUCH_END,this.onTouch,this);
|
||||
this.node.on(Node.EventType.SIZE_CHANGED,this.redraw,this);
|
||||
this.loadLevel(this.levelAsset?.json ?? LEVELS[Math.max(0,Math.min(23,this.levelIndex))]);
|
||||
this.loadLevel(this.levelAsset?.json ?? LEVELS[Math.max(0,Math.min(LEVELS.length-1,this.levelIndex))]);
|
||||
}
|
||||
onDestroy() {
|
||||
this.node.off(Node.EventType.TOUCH_END,this.onTouch,this);
|
||||
|
||||
Reference in New Issue
Block a user