forked from harfang3d/dogfight-sandbox-hg2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
missile_aim_sl.py
28 lines (20 loc) · 935 Bytes
/
missile_aim_sl.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
26
27
28
# Copyright (C) 2018-2021 Eric Kernin, NWNC HARFANG.
import harfang as hg
from random import uniform
from Machines import *
class AIM_SL(Missile):
model_name = "AIM_SL"
instance_scene_name = "weaponry/missile_aim_sl.scn"
@classmethod
def init(cls, scene):
print("AIM-SL missile class init")
def __init__(self, name, scene, scene_physics, pipeline_ressource: hg.PipelineResources, nationality):
Missile.__init__(self, name, AIM_SL.model_name, nationality, scene, scene_physics, pipeline_ressource, AIM_SL.instance_scene_name)
self.f_thrust = 120
self.smoke_parts_distance = 1.44374
self.angular_frictions = hg.Vec3(0.00008, 0.00008, 0.00008) # pitch, yaw, roll
self.drag_coeff = hg.Vec3(0.37, 0.37, 0.0003)
self.life_delay = 20
self.smoke_delay = 1
def get_hit_damages(self):
return uniform(0.25, 0.35)