mirror of
https://github.com/csd4ni3l/connect-the-current.git
synced 2026-01-01 04:13:41 +01:00
Add rotation change sound effect, add tutorial and also add it to README, fix window title, add statistics label, add custom difficulty
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import arcade, arcade.gui
|
||||
|
||||
from utils.constants import ROTATIONS, NEIGHBOURS
|
||||
from utils.preload import TEXTURE_MAP
|
||||
from utils.preload import TEXTURE_MAP, wire_sound_effect
|
||||
|
||||
def get_opposite(direction):
|
||||
if direction == "l":
|
||||
@@ -46,7 +46,10 @@ class Cell(arcade.Sprite):
|
||||
def update_visual(self):
|
||||
self.texture = TEXTURE_MAP[(self.cell_type, self.rotation, self.powered)]
|
||||
|
||||
def next_rotation(self):
|
||||
def next_rotation(self, sfx, sfx_volume):
|
||||
if sfx:
|
||||
wire_sound_effect.play(volume=sfx_volume / 50)
|
||||
|
||||
current_index = ROTATIONS[self.cell_type].index(self.rotation)
|
||||
|
||||
if current_index + 1 == len(ROTATIONS[self.cell_type]):
|
||||
|
||||
Reference in New Issue
Block a user