|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
The best way to...
Hey,
I'm making an RPG and would like to know what the best way to change equipment and and alternate between "running and walking" and "sword in sleeve and sword out of sleeve" along with some other movments. This is what im thinking of right now - I have a model which is a basic animation of a man walking and when the key R is pressed a new model will load with a new animation of the man running. And the same priniples apply to other movements. Like this - Controls - R = Run W= Walk A = Arm (draw sword) D = Dis Arm Code:
KeyboardState keys = Keyboard.GetState();
if (keys.IsKeyDown(Keys.R))
myModel = content.Load<Model>( "Run" );
}
elseif {
(keys.IsKeyDown(Keys.W))
myModel = content.Load<Model>( "Walk" );
}
elseif {
(keys.IsKeyDown(Keys.A))
myModel = content.Load<Model>( "Arm" );
}
else {
(keys.IsKeyDown(Keys.D))
myModel = content.Load<Model>( "DisArm" );
}
Is this good, or is there a better way? |
|
#2
|
||||
|
||||
|
Does it work? If so then ya it's fine
, IMO the best way is to build most of it first then do refining after, as you build you'll find if something works well or not.
__________________
Miscellaneous Software Viper_SB Developershed E-Support Anyone else play chess? Challenge me |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Game Development > The best way to... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|