Updated credits
This commit is contained in:
parent
a3a70e9b9a
commit
61e35f5c1a
@ -1,5 +1,7 @@
|
||||
# Textures
|
||||
|
||||
All the textures are edited by myself to fit the [Famicube palette](https://lospec.com/palette-list/famicube)
|
||||
|
||||
## Tileset
|
||||
|
||||
[Buch - OpenGameArt](https://opengameart.org/content/the-field-of-the-floating-islands)
|
||||
|
@ -139,6 +139,10 @@ class Game():
|
||||
|
||||
self.inputs["mouse"]["pos"] = pygame.mouse.get_pos() # Position
|
||||
self.inputs["mouse"]["rel"] = pygame.mouse.get_rel() # Déplacement par rapport à la frame précédente
|
||||
# Getting mouse position on camera
|
||||
mx = self.inputs["mouse"]["pos"][0]*self.globals["cameraw"]/self.DISPLAY_WIDTH+self.globals["camerax"]
|
||||
my = self.inputs["mouse"]["pos"][1]*self.globals["camerah"]/self.DISPLAY_HEIGHT+self.globals["cameray"]
|
||||
self.inputs["mouse"]["campos"] = [mx,my]
|
||||
|
||||
# Augmente le timer si la touche est préssée, le reset sinon
|
||||
for i in self.inputs["keys"].keys():
|
||||
|
@ -45,7 +45,7 @@ class Lemming(BaseObject):
|
||||
|
||||
# Mouse selection
|
||||
mouse=self.game.inputs["mouse"]
|
||||
distance = math.sqrt((mouse["pos"][0]-self.rect.center[0])**2+(mouse["pos"][1]-self.rect.center[1])**2)
|
||||
distance = math.sqrt((mouse["campos"][0]-self.rect.center[0])**2+(mouse["campos"][1]-self.rect.center[1])**2)
|
||||
if self.selected:
|
||||
# Caching mouse relative movement
|
||||
self.cachedrel.append(mouse["rel"])
|
||||
|
Loading…
Reference in New Issue
Block a user