-
Notifications
You must be signed in to change notification settings - Fork 0
/
Classes.py
26 lines (22 loc) · 828 Bytes
/
Classes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from ursina import *
class Bullet(Entity):
def __init__(self, add_to_scene_entities=True, **kwargs):
super().__init__(add_to_scene_entities, **kwargs,
model="assets/models/Bullet.obj",
texture="assets/textures/Bullet.png")
class Weapon(Entity):
def __init__(self, model, texture, ui_pos, is_reloading, equipped, rotation_y, rotation_z, rotation_x,):
super().__init__(
parent=camera,
model=model,
texture=texture,
position=ui_pos,
is_reloading=is_reloading,
equipped=equipped,
rotation_x=rotation_x,
rotation_y=rotation_y,
rotation_z=rotation_z)
def Shoot(self, playerx, playery, playerz, ui_pos):
Bullet1 = Bullet()
Bullet1.setPos(ui_pos)
#Bullet1.setPos((playerx, playery, playerz))