From 75296ae5c565e8619a58847192ec6b2c4ced4572 Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Tue, 20 Jun 2017 01:59:18 -0400 Subject: [PATCH] Add sound --- main.lua | 4 ++++ mine.ogg | Bin 0 -> 13719 bytes player.lua | 17 +++++++++++++---- 3 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 mine.ogg diff --git a/main.lua b/main.lua index 469a371..8f285e1 100644 --- a/main.lua +++ b/main.lua @@ -19,10 +19,14 @@ end function love.load() maplib.createmap() + font = love.graphics.newFont("font.ttf", 12) fontmed = love.graphics.newFont("font.ttf", 22) fontbig = love.graphics.newFont("font.ttf", 35) + love.graphics.setFont(font) + + minesound = love.audio.newSource("mine.ogg", "static") end diff --git a/mine.ogg b/mine.ogg new file mode 100644 index 0000000000000000000000000000000000000000..a820b89a70fdc84e6f22db83666dd49f0e327ddb GIT binary patch literal 13719 zcmb_@by!qix9|Z85d;KOkXAaSr4dAFq)WP6QW{hQK|;Dq8U&=9L6MFjq+^sCdZc5R zneU*#_r34E-}Bt>pKm{V_StLiz1Ezy_Nsm6jJmC@7Jv=>Q_3kgd9S(+bLJ9QbXeZ5 z?iThQR|D7~tydSYI9~g6X~I&!!u)r+!o&h0183U_QVGm|D{j~R65;~q_3dBU@u<7o zGC0{==>8$kpvb`gkWc6#-$Nk=w&je_e^>S^;#jzUaXDq>bg_Wz;0T`zLwCsNM;!nl z1pqT9cH#sZMfSqPJT~9dM1`wf_rr+P#E5Q6%P78{e>Dt(R<{8F2MA#!h{<19bQlq} zrDTn9&lR;-dsNJTAF1(El;GPji=|6ZU6G^92s`ujn+CWb+klJ$<2wq?tH$CzV;Cja zgwwe9F&1aK-{2_8eRG4qkKwHf|7Jmgn%HJZevH@_TivKEA$Q%lk_z9Xu4QFAo^gQ3 zh$uYspN8NM9}M8V$l_61k;-1bBLAMfDAgS#^_MLMAOvI+cos*YSWPilO*1^kq<+Aq zK`t~VAg`sZssk1;V?A%{X>YG-??8jpcScQt22JmbX5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jl@mA$e2d)^F)p3%!VTL+bvGUUW>@8w-!w~2eWQ1f$Np8 zT;Scd!DIBNy@-{__aCl}#l)f7^rSza5NNjTWjS?GJ|SmJg|oV}x{(Pa`7|gn>iNMj z%8PEP*yO4A#(8>RCIzVw@7n#{VBYXCwLbBYQNN_aX-D;19l@d%2{Oi|?L}VGapg}Q zfzLW;4@GKoE>HD4Fh5nl_3{`*9R*+@+fg%(jjFQ;J8y{lf_CbB;BJ+Z ztQyqyqc~Je_^pUhd3b>BhaeLx%%BoX#Dj$_=tM6F$@asx1L`q|`mJsYO@=EAKHEvq zlygYea@}fkKR7uVCW~wcPF!Pll$$62m>JJGz z_A>5J2`88^WUA58gC(;SBcOrOiwne-lK#f}l13w2sZ5rWFB6laT49SDP?#|XkFE2A zh3Fw61+ttW2j!Ol6>*>k<+sAMO0-~Kp_nu<4Lvl}83K4N=o9mEU+IN()w^zTXmlGdUgO&3u^-hY3fscL1+({VcORMhfK?6wZxuc|qKVb#%GVUmsDLGF z==oWf458ai#rf-U5Uvn4bp#xVtbA1>ae8Qsd?dL$3qkqOb4=9gh4Eg j_ibvvNzw7m?@s0CXG2A+eK4=*dK;HFH~TemlCb^{=!I6% literal 0 HcmV?d00001 diff --git a/player.lua b/player.lua index d8b935c..557d649 100644 --- a/player.lua +++ b/player.lua @@ -29,23 +29,32 @@ end --mining function mine(key) + local x,y = 0,0 if key == "a" then if player.playerx > 1 then - tiles[player.playerx-1][player.playery]["block"] = 0 + x = -1 end elseif key == "d" then if player.playerx < mapwidth then - tiles[player.playerx+1][player.playery]["block"] = 0 + x = 1 end elseif key == "w" then if player.playery > 1 then - tiles[player.playerx][player.playery-1]["block"] = 0 + y = -1 end elseif key == "s" then if player.playery < mapheight then - tiles[player.playerx][player.playery+1]["block"] = 0 + y = 1 end end + + --play sound and remove tile + if tiles[player.playerx+x][player.playery+y]["block"] ~= 0 then + minesound:setPitch(love.math.random(50,100)/100) + minesound:stop() + minesound:play() + tiles[player.playerx+x][player.playery+y]["block"] = 0 + end end