move you self
This commit is contained in:
parent
9cdac2b47e
commit
4d394955fa
18 changed files with 127 additions and 22 deletions
6
eastern flames/scripts/c_moveunit/c_moveunit.gml
Normal file
6
eastern flames/scripts/c_moveunit/c_moveunit.gml
Normal file
|
@ -0,0 +1,6 @@
|
|||
function c_moveunit(targetunit, destination) {
|
||||
array_remove(c_gettile(targetunit.pos.x, targetunit.pos.y).contents, targetunit);
|
||||
array_push(destination.contents, targetunit);
|
||||
targetunit.pos.x = destination.x;
|
||||
targetunit.pos.y = destination.y;
|
||||
}
|
12
eastern flames/scripts/c_moveunit/c_moveunit.yy
Normal file
12
eastern flames/scripts/c_moveunit/c_moveunit.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "Scripts",
|
||||
"path": "folders/Scripts.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "c_moveunit",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue