Okay I'm fairly new to the Pipeline extension library, and I'm trying to get the library to work with an OOP type of structure, using Types and re-usable functions to create entities like Players and Enemies. The 1 example you get for the library is fine for that kind of structure i.e. very basic but it seems very sketchy when used within functions, here is what I'd like the library to work with:
Type Player
Field name$
Field entity
Field mesh$
Field pitch#,yaw#,pitch_speed#,yaw_speed#,roll#,thrust#
End Type
player1.Player=createPlayer("Bob","\samples\meshes\ship.b3d")
While Not KeyHit(1)
For p.Player = Each Player
updatePlayer(p)
Next
UpdateWorld()
RenderWorld()
Flip
Wend
;----------------------------------------------------
Function createPlayer.Player(name$,mesh$)
p.Player = New Player
p\name$ = name$
mesh$ = LoadAnimMesh(mesh$)
p\entity = mesh$
Return p
End Function
;----------------------------------------------------
Function updatePlayer(p.Player)
Keys to update player position
End Function
;----------------------------------------------------
This is the type of structure I'd like to get the extensions libary to work with, any help would be much appreciated.
Type Player
Field name$
Field entity
Field mesh$
Field pitch#,yaw#,pitch_speed#,yaw_speed#,roll#,thrust#
End Type
player1.Player=createPlayer("Bob","\samples\meshes\ship.b3d")
While Not KeyHit(1)
For p.Player = Each Player
updatePlayer(p)
Next
UpdateWorld()
RenderWorld()
Flip
Wend
;----------------------------------------------------
Function createPlayer.Player(name$,mesh$)
p.Player = New Player
p\name$ = name$
mesh$ = LoadAnimMesh(mesh$)
p\entity = mesh$
Return p
End Function
;----------------------------------------------------
Function updatePlayer(p.Player)
Keys to update player position
End Function
;----------------------------------------------------
This is the type of structure I'd like to get the extensions libary to work with, any help would be much appreciated.