Beispiel #1
0
 private void Start()
 {
     game = GameManager.Instance;
     game.events.onPause.AddListener(Pause);
     game.events.onResume.AddListener(Resume);
     game.events.onStart.AddListener(Resume);
     surface.onSurfaceHit.AddListener(OnSurfaceHit);
     // Register Inputs
     UIManager.Controls controls = game.uiManager.controls;
     predictionLine = controls.predictionLine;
     dragPanel      = controls.dragPanel;
     joystick       = controls.joystick;
     // Initialize subsystems [LAST]
     animations.Initialize(this);
     soundEffects.Initialize(this);
     particles.Initialize(this);
     // Pause the player
     Pause();
 }