forked from gunslingermod/gunslinger_wpnpatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShells.pas
76 lines (58 loc) · 1.12 KB
/
Shells.pas
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
unit Shells;
{$IFDEF FPC}{$MODE DELPHI}{$ENDIF}
interface
uses MatVectors;
type TShell = record
id:cardinal;
wpn_id:cardinal;
need_impulse:boolean;
impulse_dir:FVector3;
spawn_time:cardinal;
end;
type TShellMgr = class
private
_shells:array of TShell;
_shells_max_cnt:cardinal;
constructor _Create;
destructor _Destroy;
public
class procedure New;
class function Get():TShellMgr;
procedure AddShell(id:cardinal; wpn_id:cardinal; imp_dir:FVector3);
procedure Update;
end;
function Init():boolean;
implementation
uses BaseGameData;
var
_instance:TShellMgr;
{ TShellMgr }
constructor TShellMgr._Create;
begin
SetLength(_shells, 0);
_shells_max_cnt:=100;
end;
destructor TShellMgr._Destroy;
begin
SetLength(_shells, 0);
_instance:=nil;
end;
procedure TShellMgr.AddShell(id, wpn_id: cardinal; imp_dir: FVector3);
begin
end;
class function TShellMgr.Get: TShellMgr;
begin
result:=_instance;
end;
class procedure TShellMgr.New;
begin
if _instance=nil then _instance:=TShellMgr.Create;
end;
procedure TShellMgr.Update;
begin
end;
function Init():boolean;
begin
_instance:=nil;
end;
end.