type arrays
Blitz3D Forums/Blitz3D Programming/type arrays
| ||
just wondering if it's bad to use them, i know they're slow but im planning on doing something like this which seems an easy way for me to handle for now. ;set for constants for each animation Const iIdle_Equipped_Nothing% = 0 Const iIdle_Equipped_Camera% = 1 Const iIdle_Equipped_Stick% = 2 Const iIdle_Equipped_Stone% = 3 Const iIdle_Equipped_LargeObject% = 4 Const iSneak_Equipped_Nothing% = 0 Const iSneak_Equipped_Camera% = 1 Const iSneak_Equipped_Stick% = 2 Const iSneak_Equipped_Stone% = 3 Const iSneak_Equipped_LargeObject% = 4 Const iWalk_Equipped_Nothing% = 0 Const iWalk_Equipped_Camera% = 1 Const iWalk_Equipped_Stick% = 2 Const iWalk_Equipped_Stone% = 3 Const iWalk_Equipped_LargeObject% = 4 Const iJog_Equipped_Nothing% = 0 Const iJog_Equipped_Camera% = 1 Const iJog_Equipped_Stick% = 2 Const iJog_Equipped_Stone% = 3 Const iJog_Equipped_LargeObject% = 4 Const iRun_Equipped_Nothing% = 0 Const iRun_Equipped_Camera% = 1 Const iRun_Equipped_Stick% = 2 Const iRun_Equipped_Stone% = 3 Const iRun_Equipped_LargeObject% = 4 Const iItem_Equipped_Nothing% = 0 Const iItem_Equipped_Camera% = 1 Const iItem_Equipped_Stick% = 2 Const iItem_Equipped_Stone% = 3 Const iItem_Equipped_LargeObject% = 4 Type MovementAnimation Field IdleAnimation[4] Field SneakAnimation[4] Field WalkAnimation[4] Field JogAnimation[4] Field RunAnimation[4] End Type Type MainCharacter field action.MovementAnimations End Type then each field will be ;then setuptypes like this Type MainCharacter Field Name$ , ModelMesh Field animation.MovementAnimation End Type Type MovementAnimation Field IdleAnimation[4] Field SneakAnimation[4] Field WalkAnimation[4] Field JogAnimation[4] Field RunAnimation[4] End Type p.MainCharacter = New MainCharacter p\animation = New MovementAnimation p\animation\IdleAnimation[iIdle_Equipped_Nothing] = ExtractAnimSeq etc |