class Point:
def init(self, x=0.0, y=0.0):
self.x = x
self.y = y
class Settings:
class Particles:
def init(self):
self.effect = 0.05 # نفس فكرة settings.particles.effect
def __init__(self):
self.particles = self.Particles()
settings = Settings()
class Particle:
def init(self):
self.position = Point()
self.velocity = Point()
self.acceleration = Point()
self.age = 0
def initialize(self, x, y, dx, dy):
self.position.x = x
self.position.y = y
self.velocity.x = dx
self.velocity.y = dy
self.acceleration.x = dx * settings.particles.effect
self.acceleration.y = dy * settings.particles.effect
self.age = 0
class Point:
def init(self, x=0.0, y=0.0):
self.x = x
self.y = y
class Settings:
class Particles:
def init(self):
self.effect = 0.05 # نفس فكرة settings.particles.effect
settings = Settings()
class Particle:
def init(self):
self.position = Point()
self.velocity = Point()
self.acceleration = Point()
self.age = 0