pause

command
v0.0.0-...-fc8682f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2015 License: BSD-2-Clause Imports: 1 Imported by: 0

README

Pause Demo

What does it do?

It demonstrates how one can pause most aspects of the game; it uses "Scrolling Up" as a command to pause, and "Scrolling Down" as a command to unpause.

For doing so, it created a few animations which will be paused. The rightmost animation should not be paused.

For information about the animations, see the Animation Demo.

What are important aspects of the code?

These lines are key in this demo:

  • game.AddSystem(&engi.PauseSystem{World: &game.World}), to add/enable the PauseSystem;
  • engi.Mailbox.Dispatch(engi.PauseMessage{amount > 0}), to send a PauseMessage to the PauseSystem, indicating (un)pausing;
  • d_entity.AddComponent(&engi.UnpauseComponent{}), to prevent the rightmost animation from being paused.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL