ugokeru
This commit is contained in:
parent
1c893940ac
commit
cfcfd3e263
21 changed files with 227 additions and 7 deletions
20
eastern flames/scripts/c_selectunit/c_selectunit.gml
Normal file
20
eastern flames/scripts/c_selectunit/c_selectunit.gml
Normal file
|
@ -0,0 +1,20 @@
|
|||
function c_selectunit(unitobject) {
|
||||
unitobject.state = st_moving;
|
||||
unitobject.drawstate = st_movingdraw;
|
||||
unitobject.returnpos = new vec2(unitobject.pos.x, unitobject.pos.y);
|
||||
var mov = 2//DONT
|
||||
var i, j;
|
||||
for (i=-mov; i<=mov; i++) {
|
||||
for (j=-mov; j<=mov; j++) {
|
||||
if abs(i)+abs(j) <= mov {
|
||||
c_colortile(unitobject.pos.x+i, unitobject.pos.y+j, c_cyan);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function c_colortile(x, y, color) {
|
||||
if !array_contains(global.map[x][y], color) {
|
||||
array_push(global.map[x][y].overlays, color);
|
||||
}
|
||||
}
|
12
eastern flames/scripts/c_selectunit/c_selectunit.yy
Normal file
12
eastern flames/scripts/c_selectunit/c_selectunit.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "Scripts",
|
||||
"path": "folders/Scripts.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "c_selectunit",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue