From 330d0ab8c9b06838a78a7f63cf329f3eea8b8653 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 26 Jul 2018 20:52:03 -0400 Subject: [PATCH] update these files --- app/assets/assets.json | 2 +- app/assets/images/playfield_vs_frame.png | Bin 4670 -> 5765 bytes app/assets/spritesheets/ints_large.png | Bin 15678 -> 3470 bytes spec/integration/online.spec.ts | 4 +- src/renderer/components/playfield_cursor.ts | 48 ++++++++++++-------- 5 files changed, 32 insertions(+), 22 deletions(-) diff --git a/app/assets/assets.json b/app/assets/assets.json index 61a1f86..d2721a6 100644 --- a/app/assets/assets.json +++ b/app/assets/assets.json @@ -40,7 +40,7 @@ ], "spritesheets" : { "ints_small" : {"size": "16x16" , "frames": 18} - ,"ints_large" : {"size": "16x28" , "frames": 18} + ,"ints_large" : {"size": "16x24" , "frames": 18} ,"playfield_cursor" : {"size": "76x44" , "frames": 3, "animations": { "flash": [0,3], diff --git a/app/assets/images/playfield_vs_frame.png b/app/assets/images/playfield_vs_frame.png index c63d104570b73cdec8881579ea4fe2650a52331c..3c2c986ebc9370d7969e7643d2971cd13c96d0fb 100644 GIT binary patch literal 5765 zcmc&&c|4SB`ybP!p#^QEWDKFjEV53S8EeV zokEtBC1o2-mMmE(F^q=y(W`UL@Avk;?>WEs^ZT6Vk7u6ep6j~q>%Nxn{k@+kTkCzR zCFLbSAkb>_{U!%NATS;T5_=962SyH*wJ?C6O-xfqrX9_V=|}J;gA7SDS2E0;LU1P^ zBojyh^cwPB5NMgYhrJ`y(aI7-q)`xrMHz%Y#S72|f%fA3y$D24G85)XcK4tfz{d+q z;V=)90o*~`3T5SGOg`zcKhT?O7ieuy4D=-Gli)ZkY_C5CFhC(Q2{3=kDJlcwZvg*h z7Xv&m4kO{PZz4=j1Nc9jat;eM8TFWI53+x$qjSR#B6CU;LQMjlF9VKAd!B4eh9za2%5J$60NVVk3?xA zH8nK=2@OU7l}Yf|pfZ%dTQDIrh~6GvOb;3rwrG*yO7meFzyVMHu>^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JiwG77xL_K*v4D#g5iAgJ!8CYd0T(YKSRmknY4FAZE?z{iK)?ml;Ee@byog|d zfD5L<8w2fq)C9!5a&>coD$@0T)bz zH@+{f$l#loqyxNe=>hLmHYqm!3cQmkG8?l^2vYtuf>doskl_h%y^SDl3_~ed73SyTuiZ z`!$M=rbPYNn%?9OCJNtZ+IePQ#^C79Q!C_cQ8oSEfn(!Yqjb{CSI}pEo;7jF{f}>d z9d@)m+}3q?$g`m)SAMC#V5_ctBEBqL)raEaaiZ567VbM!(Y{fek@%aeiTsL3b~a9I ze7tG6w%=Hh*Gb*F@K|N^-jCAHXSGRsXgVPDGo+LJFUzwkzvwDt1V4HI!9!vo?A&%bT5*c(hk z)vF}6t)G1PW*gmA`O5kHp_;18CnNqKzTVyymSO5shh5*18MnD{;ag*}&o*`*K6AP! z*46)MNs8}g?lN&~ucmzB+`yW9*ZUS+tUnmu_;vIN_nz7TQ+UZl&!A)^p}lVG?hkpT z&Tjcj_;Ok2&@LsfO}AG|LA&NdSRFTc;)c$H)Eae zKfJc)mG7(ftcoyxb!S_3K7H`9?wCEfSC1zj6aRd&Kr=gwg)zs-~!upR`8imB)1AAM}&QUtPblL%H=5y)1gKI4tP} zV*l`gy50G%V&>y#+YVg;gS}d19J*2xlXtba_Qx9;7jGS7P8Sbs`gg(d6Lo*{uib|p z2XlU1?f0hh>ZcxwSaS5ml8)z2_Fzp3&27K`{LEkL_i{IbjV_J2=HBx~B|Um+^wgHW zw;b`;(}A0oikKJsI@&6#-~H_%xoYLsp8A8QZZzfKBi)Ny2Nx8z_x6o0Z5UJ*ovnMJ gb$Qs)qa#lsSC<`s$l&a|#=YU3Zdj{tPT9Qef9X4`p8x;= diff --git a/spec/integration/online.spec.ts b/spec/integration/online.spec.ts index 36042c3..40de65a 100644 --- a/spec/integration/online.spec.ts +++ b/spec/integration/online.spec.ts @@ -57,14 +57,14 @@ function press_up(n,key) { describe('Online Simulation', function() { beforeEach(function(){ const init0 = { - countdown: false + countdown: false, seed : 'puzzle', cpu : [false,false], online : true, controls : controls0 } const init1 = { - countdown: false + countdown: false, seed : 'puzzle', cpu : [false,false], online : true, diff --git a/src/renderer/components/playfield_cursor.ts b/src/renderer/components/playfield_cursor.ts index 7a81de6..8ad0188 100644 --- a/src/renderer/components/playfield_cursor.ts +++ b/src/renderer/components/playfield_cursor.ts @@ -30,6 +30,8 @@ export default class ComponentPlayfieldCursor { public mode : string public x : number public y : number + public px_x : number + public px_y : number private visible : boolean /** * Initialises the Cursor's position in x & y, counter, and its sprite @@ -66,16 +68,17 @@ export default class ComponentPlayfieldCursor { this.y = 6 + ROWS_INV let x,y, visible if(this.playfield.stage.countdown.state === MOVING){ - x = ((COLS-2)*UNIT) - this.offset - y = 0 - this.offset visible = false } else { - x = (this.x * UNIT) - this.offset - y = (this.y * UNIT) - this.offset visible = true this.state = 'active' this.map_controls() } + + x = (this.x * UNIT) - this.offset + y = (this.y * UNIT) - this.offset + this.px_x = x + this.px_y = y this.sprite.x = x this.sprite.x = y this.sprite.visible = visible @@ -275,24 +278,28 @@ export default class ComponentPlayfieldCursor { let x = (this.x * UNIT) - this.offset let y = (this.y * UNIT) - this.offset - if(this.state === 'entering') { - // increases by STARTPOS_PANELCURSOR_SPEED until y is reached, then sets it to y - this.sprite.y = this.sprite.y < y ? this.sprite.y + STARTPOS_PANELCURSOR_SPEED : y; - - // once sprite.y has reached its goal position move x the same way - if (this.sprite.y === y) - this.sprite.x = this.sprite.x > x ? this.sprite.x - STARTPOS_PANELCURSOR_SPEED : x; + this.update_entering(x,y) - if (this.sprite.x === x && this.sprite.y === y) { - this.map_controls(); // full control of moving - this.state = "preactive"; - } + if(this.state === 'preactive' || this.state === 'active') { + this.px_x = x + this.px_y = y } - else if(this.state === 'preactive' || this.state === 'active') { - this.sprite.x = x - this.sprite.y = y + + this.update_flickering() + } + + update_entering(x,y){ + if(this.state !== 'entering') { return } + this.px_y = this.px_y < y ? this.px_y + STARTPOS_PANELCURSOR_SPEED : y; + if (this.y === y) { this.px_x = this.px_x > x ? this.px_x - STARTPOS_PANELCURSOR_SPEED : x; } + + if (this.px_x === x && this.px_y === y) { + this.map_controls(); // full control of moving + this.state = "preactive"; } + } + update_flickering(){ if (['entering','preactive'].includes(this.state)) { this.counter_flicker++; if (this.counter_flicker > 1) @@ -301,6 +308,7 @@ export default class ComponentPlayfieldCursor { } } + get stage(){ return this.playfield.stage } @@ -319,11 +327,13 @@ export default class ComponentPlayfieldCursor { this.sprite.visible = true } } - + /** updates the actual sprite position, almost the same as update() */ render() { this.render_visible() this.sprite.frame = this.frame + this.sprite.x = this.px_x + this.sprite.y = this.px_y } /** empty */