File tree 1 file changed +33
-3
lines changed
1 file changed +33
-3
lines changed Original file line number Diff line number Diff line change @@ -347,11 +347,31 @@ function Game:clear_lines()
347
347
points = 40
348
348
end
349
349
if points > 0 then
350
- -- PlaySound(self.lineclear_sound)
350
+ riv_waveform(riv_waveform_desc{
351
+ type = RIV_WAVEFORM_NOISE,
352
+ attack = 0.1,
353
+ decay = 0.05,
354
+ sustain = 0.1,
355
+ release = 0.05,
356
+ start_frequency = 220,
357
+ end_frequency = 40,
358
+ amplitude = 0.25,
359
+ sustain_level = 0.8,
360
+ })
351
361
self.lines = self.lines + num_lines
352
362
local level = 1 + (self.lines // 10)
353
363
if self.level ~= level then
354
- -- PlaySound(self.levelup_sound)
364
+ riv_waveform(riv_waveform_desc{
365
+ type = RIV_WAVEFORM_PULSE,
366
+ attack = 0.015,
367
+ decay = 0.05,
368
+ sustain = 0.4,
369
+ release = 0.8,
370
+ start_frequency = 80,
371
+ end_frequency = 440,
372
+ amplitude = 0.25,
373
+ sustain_level = 0.5,
374
+ })
355
375
self.level = level
356
376
end
357
377
self.score = self.score + points
@@ -413,7 +433,17 @@ function Game:rotate_current_piece(left: boolean): boolean
413
433
end
414
434
415
435
function Game:place_current_piece()
416
- -- PlaySound(self.hit_sound)
436
+ riv_waveform(riv_waveform_desc{
437
+ type = RIV_WAVEFORM_SINE,
438
+ attack = 0.01,
439
+ decay = 0.04,
440
+ sustain = 0.05,
441
+ release = 0.05,
442
+ start_frequency = 440,
443
+ end_frequency = 600,
444
+ amplitude = 0.25,
445
+ sustain_level = 0.5,
446
+ })
417
447
self.board:place_piece(self.cur_piece)
418
448
self:clear_lines()
419
449
if not self:spawn_piece() then
You can’t perform that action at this time.
0 commit comments