In the Creating a trigger system recipe, we laid the foundation for a Trigger
system as well as created some basic implementations. A timer can be very useful when creating complex scripts that rely on timing or sequenced events. Not only does it do the obvious (trigger the blast of the door and then the soldiers running through) but it can also work as a relay trigger in case many things should be triggered at the same time. In this recipe, we'll create this Timer
object as well as an actual implementation of it where it triggers an explosion with several components. To save some time, we'll use the TestExplosion
test from jMonkeyEngine to get ParticleEmitters
set up and the timing for free. We'll also create a new ScriptObject
called PlayEffect
, which controls the particle emitters.
JMonkeyEngine 3.0 Cookbook
By :
JMonkeyEngine 3.0 Cookbook
By:
Overview of this book
Table of Contents (17 chapters)
jMonkeyEngine 3.0 Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
SDK Game Development Hub
Cameras and Game Controls
World Building
Mastering Character Animations
Artificial Intelligence
GUI with Nifty GUI
Networking with SpiderMonkey
Physics with Bullet
Taking Our Game to the Next Level
Information Fragments
Index
Customer Reviews