Merge branch 'master' of https://git.touhou.dev/shaun_chaky/eastern-flames
This commit is contained in:
commit
a9003c47ca
20 changed files with 37 additions and 34 deletions
|
@ -10,6 +10,6 @@ function c_input() {
|
|||
rightp = keyboard_check_pressed(ord("D")) + keyboard_check_pressed(vk_right);
|
||||
|
||||
select = mouse_check_button_pressed(mb_left) + keyboard_check_pressed(vk_enter);
|
||||
back = mouse_check_button_pressed(mb_right) + keyboard_check_pressed(vk_escape);
|
||||
back = mouse_check_button_pressed(mb_right) + keyboard_check_pressed(vk_escape) + keyboard_check_pressed(ord("Q"));
|
||||
stop = keyboard_check(vk_shift);
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
function st_moving() {
|
||||
var mov = data.mov.val;
|
||||
c_input();
|
||||
hspd = lerp(hspd, (right-left)*.05, .4);
|
||||
vspd = lerp(vspd, (down-up)*.05, .4);
|
||||
hspd = lerp(hspd, (right-left)*.07, .4);
|
||||
vspd = lerp(vspd, (down-up)*.07, .4);
|
||||
if !stop dir = DIR.NONE;
|
||||
if left dir = DIR.LEFT;
|
||||
if down dir = DIR.DOWN;
|
||||
|
@ -47,27 +47,23 @@ function st_moving() {
|
|||
//var rng = [1];
|
||||
var guy = c_gettile(x, y, true);
|
||||
var hitting = noone;
|
||||
if guy != noone && stop {
|
||||
if guy != noone {
|
||||
switch dir {
|
||||
case DIR.LEFT:
|
||||
hitting = c_gettile(guy.x-1, guy.y);
|
||||
c_colortile(guy.x-1, guy.y, c_red);
|
||||
sprite_index = data.down;
|
||||
image_xscale = -1;
|
||||
break;
|
||||
case DIR.DOWN:
|
||||
hitting = c_gettile(guy.x, guy.y+1);
|
||||
c_colortile(guy.x, guy.y+1, c_red);
|
||||
sprite_index = data.down;
|
||||
break;
|
||||
case DIR.UP:
|
||||
hitting = c_gettile(guy.x, guy.y-1);
|
||||
c_colortile(guy.x, guy.y-1, c_red);
|
||||
sprite_index = data.up;
|
||||
break;
|
||||
case DIR.RIGHT:
|
||||
hitting = c_gettile(guy.x+1, guy.y);
|
||||
c_colortile(guy.x+1, guy.y, c_red);
|
||||
sprite_index = data.down;
|
||||
image_xscale = 1;
|
||||
break;
|
||||
|
@ -77,7 +73,8 @@ function st_moving() {
|
|||
break;
|
||||
|
||||
}
|
||||
if hitting != noone && select {
|
||||
if hitting != noone && select && stop {
|
||||
c_colortile(hitting.x, hitting.y, c_red);
|
||||
log("found one");
|
||||
log(hitting.contents, hitting.x, hitting.y);
|
||||
var i;
|
||||
|
|
|
@ -24,7 +24,7 @@ function c_informtiles() {
|
|||
}
|
||||
}
|
||||
c_informtiles();
|
||||
global.tilesize = new vec2(32, 32);
|
||||
global.tilesize = new vec2(20, 20);
|
||||
|
||||
function tiledata(passable_=true, contents_=[], overlays_=[], statmods=[]) constructor {
|
||||
passable = passable_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue