class Entity: @ServerMethod def shoot(self): self.ammo -= 1 ray = self.handler.world.ray_cast(self.gun_direction) #.....
@ClientMethod def shoot(self): self.ammo -= 1 ray = self.handler.world.ray_cast(self.gun_direction) PlaySound("Shoot") def update(self): if self.inputs.shoot: self.shoot()
class Entity: @ServerMethod def shoot(self): self.ammo -= 1 ray = self.handler.world.ray_cast(self.gun_direction) #..... @ClientMethod def shoot(self): self.ammo -= 1 ray = self.handler.world.ray_cast(self.gun_direction) PlaySound("Shoot") def update(self): if self.inputs.shoot: self.shoot()
|