eeee
This commit is contained in:
parent
5a5a31430c
commit
1ddffb71e4
|
@ -34,7 +34,8 @@ IT WON'T BE LONG NOW, BEFORE WE GO TO OUR REWARD.
|
|||
TETÉLESTAI
|
||||
]],
|
||||
phoneRing = "THE PHONE RINGS IMPATIENTLY",
|
||||
phonePickup = "[%s]: PICK UP",
|
||||
phoneRedial = "[%s]: *69",
|
||||
phonePickup = "[%s]: PICK UP", --use key
|
||||
phoneRedial = "[%s]: *69", --use key
|
||||
phoneClue = "🔔🔔🔔🔔🔔🔔🔔",
|
||||
phoneWin = "WHAT IS WANTED",
|
||||
}
|
|
@ -92,4 +92,8 @@ function t.pickupPhone()
|
|||
return contempra.pickup()
|
||||
end
|
||||
|
||||
function t.ring( idx )
|
||||
return bell.ring( idx )
|
||||
end
|
||||
|
||||
return t
|
|
@ -107,13 +107,19 @@ local bellMesh = lgMesh( asset.meshes[1].primitives[1] )
|
|||
-- scale, x, z, colorparam
|
||||
local bells = {}
|
||||
local bellInstanceMesh
|
||||
local ringSource = love.audio.newSource( "sfx/bellC2.ogg", "static" )
|
||||
|
||||
do
|
||||
local c, s = math.cos( 2*math.pi / 7 ), -math.sin( 2*math.pi / 7 )
|
||||
|
||||
local x, z = math.cos(math.pi/7), -math.sin( math.pi/7 )
|
||||
local pitches = { 0, 5, 8, 12, 10, 22, 25 }
|
||||
for i = 1, #pitches do
|
||||
pitches[i] = math.pow( 2.0, pitches[i] / 12.0 )
|
||||
end
|
||||
|
||||
local r = 20
|
||||
for i = 1, 7 do
|
||||
bells[i] = { i / 2, r * x, r * z, (i-1)/6 }
|
||||
bells[i] = { 5.0 / pitches[i], r * x, r * z, (i-1)/6 }
|
||||
x, z = c*x+s*z, c*z-s*x
|
||||
end
|
||||
bellInstanceMesh = lg.newMesh({{"bellInstance","float",4}}, bells, nil, "static" )
|
||||
|
@ -139,11 +145,16 @@ end
|
|||
function t.transpose( i, j )
|
||||
print( "transposing:", i, j )
|
||||
io.flush()
|
||||
bells[i][2], bells[i][3], bells[j][2], bells[j][3] =
|
||||
bells[j][2], bells[j][3], bells[i][2], bells[i][3]
|
||||
bells[i][1], bells[j][1] = bells[j][1], bells[i][1]
|
||||
bellInstanceMesh:setVertices( bells )
|
||||
bellMesh:attachAttribute( "bellInstance", bellInstanceMesh,
|
||||
"perinstance" )
|
||||
end
|
||||
|
||||
function t.ring( i )
|
||||
ringSource:stop()
|
||||
ringSource:setPitch( bells[i][1] )
|
||||
ringSource:play()
|
||||
end
|
||||
|
||||
return t
|
|
@ -121,7 +121,7 @@ local shaders = {
|
|||
}
|
||||
|
||||
local function veilAlpha( x, z )
|
||||
return math.max( 0, math.min( 1.0, 1.0 - (x*x+z*z - 7.0) / 25.0))
|
||||
return math.max( 0, math.min( 1.0, 1.0 - (x*x+z*z - 3.0) / 90.0))
|
||||
end
|
||||
|
||||
function obj.draw( view, proj, light, x, z )
|
||||
|
|
|
@ -88,6 +88,9 @@ function t.keypressed( key, code, isrepeat )
|
|||
if code == "1" then
|
||||
return world.transposeBells( 2, 7 )
|
||||
end
|
||||
if code == "5" then
|
||||
return world.ring( 2 )
|
||||
end
|
||||
end
|
||||
|
||||
function t.keyreleased( key, code )
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue