Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
rexrainbow committed Oct 27, 2023
1 parent 84fc0d0 commit 791868f
Show file tree
Hide file tree
Showing 324 changed files with 655 additions and 655 deletions.
4 changes: 2 additions & 2 deletions examples/blitter/stratch.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ class Demo extends Phaser.Scene {
update(time) { }
}

const COLOR_PRIMARY = 0x9575cd;
const COLOR_MAIN = 0x9575cd;
const COLOR_LIGHT = 0xc7a4ff;
const COLOR_DARK = 0x65499c
var CreateTexture0 = function (scene, key) {
// width: 20-10-20
// height: 20-10-20
var width = 50, height = 50;
scene.add.graphics()
.fillStyle(COLOR_PRIMARY)
.fillStyle(COLOR_MAIN)
.fillTriangle(0, 0, 0, 20, 20, 0)
.fillTriangle(width, height, width, height - 20, width - 20, height)
.lineStyle(3, COLOR_DARK)
Expand Down
2 changes: 1 addition & 1 deletion examples/board-fieldofview/big-board.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ var findFOV = function (chessA) {
}
}

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;
const COLOR_VISIBLE = 0xc49000;
Expand Down
2 changes: 1 addition & 1 deletion examples/board-fieldofview/field-of-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ var findFOV = function (chessA) {
}
}

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;
const COLOR_VISIBLE = 0xc49000;
Expand Down
2 changes: 1 addition & 1 deletion examples/board-fieldofview/fov-blocker.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ var findFOV = function (chessA) {
}
}

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;
const COLOR_VISIBLE = 0xc49000;
Expand Down
2 changes: 1 addition & 1 deletion examples/board-fieldofview/fov-occupied.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ var findFOV = function (chessA) {
}
}

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;
const COLOR_VISIBLE = 0xc49000;
Expand Down
2 changes: 1 addition & 1 deletion examples/board-fieldofview/fov-pretest.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ var findFOV = function (chessA) {
}
}

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;
const COLOR_VISIBLE = 0xc49000;
Expand Down
2 changes: 1 addition & 1 deletion examples/board-fieldofview/line-of-sight.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ var LOS = function (chessA, marker) {
marker.setFillStyle((isInLOS) ? COLOR_VISIBLE : COLOR_INVISIBLE);
}

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;
const COLOR_VISIBLE = 0xc49000;
Expand Down
2 changes: 1 addition & 1 deletion examples/board-fieldofview/pathfinder-los.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ var FindFOV = function (chessA) {
}
}

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;
const COLOR_VISIBLE = 0xc49000;
Expand Down
2 changes: 1 addition & 1 deletion examples/board-moveto/follow.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import phaser from 'phaser/src/phaser.js';
import BoardPlugin from '../../plugins/board-plugin.js';

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;

Expand Down
2 changes: 1 addition & 1 deletion examples/board-moveto/push.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import phaser from 'phaser/src/phaser.js';
import BoardPlugin from '../../plugins/board-plugin.js';

const COLOR_PRIMARY = 0x7986cb;
const COLOR_MAIN = 0x7986cb;
const COLOR_LIGHT = 0xaab6fe;
const COLOR_DARK = 0x49599a;

Expand Down
2 changes: 1 addition & 1 deletion examples/board-pathfinder/big-board.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import BoardPlugin from '../../plugins/board-plugin.js';
import FitToViewport from '../../plugins/utils/rendertexture/FitToViewport.js';
import GetViewport from '../../plugins/utils/system/GetViewport.js';

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;

Expand Down
4 changes: 2 additions & 2 deletions examples/board-pathfinder/chinese-checkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Board extends RexPlugins.Board.Board {
var graphics = scene.add.graphics({
lineStyle: {
width: 1,
color: COLOR_PRIMARY,
color: COLOR_MAIN,
alpha: 1
}
})
Expand Down Expand Up @@ -165,7 +165,7 @@ class MoveableMarker extends RexPlugins.Board.Shape {
}
}

const COLOR_PRIMARY = 0x43a047;
const COLOR_MAIN = 0x43a047;
const COLOR_LIGHT = 0x76d275;
const COLOR_DARK = 0x00701a;

Expand Down
2 changes: 1 addition & 1 deletion examples/board-pathfinder/draw-path.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import phaser from 'phaser/src/phaser.js';
import BoardPlugin from '../../plugins/board-plugin.js';

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;

Expand Down
4 changes: 2 additions & 2 deletions examples/board-pathfinder/energy-drain.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ var CreateLabels = function (scene) {
row: 3,
rowProportions: 1,
})
.addBackground(scene.rexUI.add.roundRectangle(0, 0, 0, 0, 10, COLOR_PRIMARY))
.addBackground(scene.rexUI.add.roundRectangle(0, 0, 0, 0, 10, COLOR_MAIN))

.add(scene.add.image(0, 0, 'source').setTint(COLOR_SOURCE), 0, 0, 'center', { left: 10, right: 10 }, false)
.add(scene.add.text(0, 0, 'Source'), 1, 0, 'left', 0, false)
Expand All @@ -234,7 +234,7 @@ var CreateLabels = function (scene) {
return labels;
}

const COLOR_PRIMARY = 0x4e342e;
const COLOR_MAIN = 0x4e342e;
const COLOR_LIGHT = 0x7b5e57;
const COLOR_DARK = 0x260e04;

Expand Down
4 changes: 2 additions & 2 deletions examples/board-pathfinder/find-area-get-path-ts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class MyBoard extends Board {
var graphics = scene.add.graphics({
lineStyle: {
width: 1,
color: COLOR_PRIMARY,
color: COLOR_MAIN,
alpha: 1
}
});
Expand Down Expand Up @@ -199,7 +199,7 @@ class MoveableMarker extends Shape {
}
}

const COLOR_PRIMARY = 0x43a047;
const COLOR_MAIN = 0x43a047;
const COLOR_LIGHT = 0x76d275;
const COLOR_DARK = 0x00701a;

Expand Down
4 changes: 2 additions & 2 deletions examples/board-pathfinder/find-area-get-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Board extends RexPlugins.Board.Board {
var graphics = scene.add.graphics({
lineStyle: {
width: 1,
color: COLOR_PRIMARY,
color: COLOR_MAIN,
alpha: 1
}
});
Expand Down Expand Up @@ -173,7 +173,7 @@ class MoveableMarker extends RexPlugins.Board.Shape {
}
}

const COLOR_PRIMARY = 0x43a047;
const COLOR_MAIN = 0x43a047;
const COLOR_LIGHT = 0x76d275;
const COLOR_DARK = 0x00701a;

Expand Down
4 changes: 2 additions & 2 deletions examples/board-pathfinder/move-from-high-to-low.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,15 @@ class MoveableMarker extends RexPlugins.Board.Shape {
}
}

const COLOR_PRIMARY = 0x43a047;
const COLOR_MAIN = 0x43a047;
const COLOR_LIGHT = 0x76d275;
const COLOR_DARK = 0x00701a;

const COLOR2_PRIMARY = 0xd81b60;
const COLOR2_LIGHT = 0xff5c8d;
const COLOR2_DARK = 0xa00037;

const LevelToColor = [COLOR_DARK, COLOR_PRIMARY];
const LevelToColor = [COLOR_DARK, COLOR_MAIN];

var config = {
type: Phaser.AUTO,
Expand Down
4 changes: 2 additions & 2 deletions examples/board-pathfinder/turning-cost.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Board extends RexPlugins.Board.Board {
var graphics = scene.add.graphics({
lineStyle: {
width: 1,
color: COLOR_PRIMARY,
color: COLOR_MAIN,
alpha: 1
}
});
Expand Down Expand Up @@ -189,7 +189,7 @@ class MoveableMarker extends RexPlugins.Board.Shape {
}
}

const COLOR_PRIMARY = 0x43a047;
const COLOR_MAIN = 0x43a047;
const COLOR_LIGHT = 0x76d275;
const COLOR_DARK = 0x00701a;

Expand Down
2 changes: 1 addition & 1 deletion examples/board/circle-to-tileXY-array.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import phaser from 'phaser/src/phaser.js';
import BoardPlugin from '../../plugins/board-plugin.js';

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;

Expand Down
4 changes: 2 additions & 2 deletions examples/board/direction-between.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import phaser from 'phaser/src/phaser.js';
import BoardPlugin from '../../plugins/board-plugin.js';

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;

Expand Down Expand Up @@ -37,7 +37,7 @@ class Demo extends Phaser.Scene {
}, this);

var chess0 = this.rexBoard.add.shape(board, 5, 5, 0, COLOR_LIGHT).setScale(0.7);
var chess1 = this.rexBoard.add.shape(board, 6, 5, 0, COLOR_PRIMARY).setScale(0.7);
var chess1 = this.rexBoard.add.shape(board, 6, 5, 0, COLOR_MAIN).setScale(0.7);
print.text = board.directionBetween(chess0, chess1, false);

board
Expand Down
4 changes: 2 additions & 2 deletions examples/board/drag-to-neighbor.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import phaser from 'phaser/src/phaser.js';
import BoardPlugin from '../../plugins/board-plugin.js';

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;

Expand Down Expand Up @@ -58,7 +58,7 @@ class Demo extends Phaser.Scene {
}
var neighborTileXY = board.getNeighborTileXYAtAngle(chessA, pointer.getAngle());
if (neighborTileXY) {
neighobrChess = this.rexBoard.add.shape(board, neighborTileXY.x, neighborTileXY.y, 0, COLOR_PRIMARY);
neighobrChess = this.rexBoard.add.shape(board, neighborTileXY.x, neighborTileXY.y, 0, COLOR_MAIN);
}
}, this)
}
Expand Down
2 changes: 1 addition & 1 deletion examples/board/ellipse-to-tileXY-array.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import phaser from 'phaser/src/phaser.js';
import BoardPlugin from '../../plugins/board-plugin.js';

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;

Expand Down
4 changes: 2 additions & 2 deletions examples/board/filled-ring-chess-array.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import phaser from 'phaser/src/phaser.js';
import BoardPlugin from '../../plugins/board-plugin.js';

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;

Expand Down Expand Up @@ -59,7 +59,7 @@ class Demo extends Phaser.Scene {
// Get neighbor chess around target chess
board.filledRingToChessArray(gameObject, 2, 0, lastChessArray);
for (var i = 0, cnt = lastChessArray.length; i < cnt; i++) {
lastChessArray[i].setFillStyle(COLOR_PRIMARY, 1);
lastChessArray[i].setFillStyle(COLOR_MAIN, 1);
}
// Target chess is included in lastChessArray already
gameObject.setFillStyle(COLOR_LIGHT);
Expand Down
2 changes: 1 addition & 1 deletion examples/board/filled-ring-tileXY-array.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import phaser from 'phaser/src/phaser.js';
import BoardPlugin from '../../plugins/board-plugin.js';

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;

Expand Down
4 changes: 2 additions & 2 deletions examples/board/gameobjectout-event.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import phaser from 'phaser/src/phaser.js';
import BoardPlugin from '../../plugins/board-plugin.js';

const COLOR_PRIMARY = 0x4e342e;
const COLOR_MAIN = 0x4e342e;
const COLOR_LIGHT = 0x7b5e57;
const COLOR_DARK = 0x260e04;

Expand Down Expand Up @@ -33,7 +33,7 @@ class Demo extends Phaser.Scene {
board
.setInteractive()
.on('gameobjectover', function (pointer, gameObject) {
gameObject.setFillStyle(COLOR_PRIMARY);
gameObject.setFillStyle(COLOR_MAIN);
})
.on('gameobjectout', function (pointer, gameObject) {
gameObject.setFillStyle();
Expand Down
4 changes: 2 additions & 2 deletions examples/board/get-neighbor-tileXY.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import phaser from 'phaser/src/phaser.js';
import BoardPlugin from '../../plugins/board-plugin.js';

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;

Expand Down Expand Up @@ -45,7 +45,7 @@ class Demo extends Phaser.Scene {
return;
}

this.rexBoard.add.shape(board, tileXY.x, tileXY.y, 0, COLOR_PRIMARY).setScale(0.7);
this.rexBoard.add.shape(board, tileXY.x, tileXY.y, 0, COLOR_MAIN).setScale(0.7);
var neighborsTileXYArray = board.getNeighborTileXY(tileXY, '0,2,4');
var neighborTileXY;
for (var i = 0, cnt = neighborsTileXYArray.length; i < cnt; i++) {
Expand Down
4 changes: 2 additions & 2 deletions examples/board/get-tileXY-at-direction.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import phaser from 'phaser/src/phaser.js';
import BoardPlugin from '../../plugins/board-plugin.js';

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;

Expand Down Expand Up @@ -45,7 +45,7 @@ class Demo extends Phaser.Scene {
return;
}

this.rexBoard.add.shape(board, tileXY.x, tileXY.y, 0, COLOR_PRIMARY).setScale(0.7);
this.rexBoard.add.shape(board, tileXY.x, tileXY.y, 0, COLOR_MAIN).setScale(0.7);
var resultTileXYArray = board.getTileXYAtDirection(tileXY, [0, 2, 4], { end: 3 });
var resultTileXY;
for (var i = 0, cnt = resultTileXYArray.length; i < cnt; i++) {
Expand Down
2 changes: 1 addition & 1 deletion examples/board/grid-bounds.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import phaser from 'phaser/src/phaser.js';
import BoardPlugin from '../../plugins/board-plugin.js';

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;

Expand Down
2 changes: 1 addition & 1 deletion examples/board/line-to-tileXY-array.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import phaser from 'phaser/src/phaser.js';
import BoardPlugin from '../../plugins/board-plugin.js';

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;

Expand Down
2 changes: 1 addition & 1 deletion examples/board/polygon-to-tileXY-array.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import phaser from 'phaser/src/phaser.js';
import BoardPlugin from '../../plugins/board-plugin.js';

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;

Expand Down
2 changes: 1 addition & 1 deletion examples/board/ring-tileXY-array.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import phaser from 'phaser/src/phaser.js';
import BoardPlugin from '../../plugins/board-plugin.js';

const COLOR_PRIMARY = 0x03a9f4;
const COLOR_MAIN = 0x03a9f4;
const COLOR_LIGHT = 0x67daff;
const COLOR_DARK = 0x007ac1;

Expand Down
Loading

0 comments on commit 791868f

Please sign in to comment.