Shard Posted April 19, 2010 Share Posted April 19, 2010 So I have the reload animation, and I know the start and end frames. My question is how do I know when the reload animation is completed? How do I check for this? Current Code else if(aniState == reloading) { aniStart = weapon->reloadStart; aniEnd = weapon->reloadEnd; world->frameWerk.GetRenderer().SetFarDOFRange(Vec2(0,50)); world->frameWerk.GetRenderer().SetFarDOFStrength(200); world->frameWerk.GetRenderer().SetFarDOF( true ); frame=AppTime()/30.0; } frame=fmodf(frame,aniEnd-aniStart)+aniStart; Animate(playerBody,frame,1.0,0,true); Quote Programmer/Engineer/Student www.reikumar.com 2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM C++ - Visual Studio Express - Dark GDK - Leadwerks SDK Link to comment Share on other sites More sharing options...
Shard Posted April 20, 2010 Author Share Posted April 20, 2010 Anyone? Quote Programmer/Engineer/Student www.reikumar.com 2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM C++ - Visual Studio Express - Dark GDK - Leadwerks SDK Link to comment Share on other sites More sharing options...
Masterxilo Posted April 20, 2010 Share Posted April 20, 2010 This is implementation specific. But can't you just check if "frame >= endFrame" (skip the fmodf for non looping animations)? Quote Hurricane-Eye Entertainment - Site, blog. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.