How can I make my Sprite launch an object towards the mouse position?
问题 For a school project, I need to finish up the pygame program below by implementing a way of shooting Kunais/Shurikens towards the mouse position, to be able to hit the enemy sprite. import pygame import math import random from pygame.locals import * pygame.init() fenetre = pygame.display.set_mode((640,480), RESIZABLE) pause = False class perso(): def __init__(self,image,x=0,y=0,directionX=1,directionY=1): self.image = pygame.image.load(image).convert_alpha() self.x = x self.y = y self