Funny changes.

This commit is contained in:
entar 2025-06-15 10:30:46 +07:00
parent f55d07fd42
commit 1a03f82697
3 changed files with 61 additions and 11 deletions

View File

@ -1,26 +1,20 @@
local module = {}
local myMath = require("modules.math")
local myTypes = require("modules.types")
local lastChange = 0
local amp = 50
local enabled = false
local enabled = true
function module.onCreate()
lastChange = 0
end
local randoms = {
math.random(60, 140),
math.random(60, 140),
math.random(60, 140),
math.random(60, 140),
math.random(60, 140),
math.random(60, 140),
math.random(60, 140),
math.random(60, 140)
}
local realPositions = {
@ -30,10 +24,33 @@ local realPositions = {
837
}
local ogPositions = {}
local degree = -45
function module.onCreate()
lastChange = 0
for index, receptor in next, module.shared.receptors do
-- receptor.position.x = 100
-- receptor.position.y = 500 + 70 * (index - 1)
-- receptor.rotation = degree
end
end
function module.onUpdate(dt, elapsed)
if enabled then
for index, receptor in next, module.shared.receptors do
receptor.position.x = realPositions[index] + 50 * math.sin(elapsed / randoms[index])
for index, note in next, module.shared.notes do
if note.mustPress then
note.offset.x = math.sin(math.rad(degree)) * (note.position - elapsed) * module.shared.speed
note.offset.y = (math.cos(math.rad(degree)) * (note.position - elapsed) * module.shared.speed) - (note.position - elapsed)
-- note.sprite.rotation = degree
end
end
for index, hold in next, module.shared.holds do
if hold.mustPress then
hold.offset.x = math.sin(math.rad(degree)) * (hold.position - elapsed) * module.shared.speed
hold.offset.y = (math.cos(math.rad(degree)) * (hold.position - elapsed) * module.shared.speed) - (hold.position - elapsed)
hold.sprite.rotation = degree
end
end
end
end

33
log.log

File diff suppressed because one or more lines are too long

View File

@ -162,12 +162,14 @@ local function state(songName, songDifficulty)
},
settings = settings,
receptors = receptors,
splashes = splashes,
opponentReceptors = opponentReceptors,
health = health,
speed = speed,
ui = ui,
zoom = zoom,
notes = notes, -- only spawned notes
holds = holdNotes,
characters = characters
}