Exemplo n.º 1
0
 void ICmpInitializable.OnShutdown(Component.ShutdownContext context)
 {
     if (context == ShutdownContext.Deactivate)
     {
         this.NotifyEvent(EventType.Deactivate);
     }
     else if (context == ShutdownContext.Saving)
     {
         this.NotifyEvent(EventType.Saving);
     }
 }
Exemplo n.º 2
0
        void ICmpInitializable.OnShutdown(Component.ShutdownContext context)
        {
            switch (context)
            {
            case ShutdownContext.Deactivate:                                this.receivedEvents |= EventFlag.Deactivate;                            break;

            case ShutdownContext.RemovingFromGameObject:    this.receivedEvents |= EventFlag.RemovingFromGameObject;        break;

            case ShutdownContext.Saving:                                    this.receivedEvents |= EventFlag.Saving;                                        break;
            }
        }
 void ICmpInitializable.OnShutdown(Component.ShutdownContext context)
 {
     if (context == ShutdownContext.Deactivate)
     {
         // Clean up the temporary friction joint we have created
         if (this.frictionJoint != null)
         {
             this.frictionJoint.ParentBody.RemoveJoint(this.frictionJoint);
             this.frictionJoint = null;
         }
     }
 }
        void ICmpInitializable.OnShutdown(Component.ShutdownContext context)
        {
            if (context == ShutdownContext.Deactivate)
            {
                DualityApp.Mouse.ButtonDown   -= _mouseDownEventHandler;
                DualityApp.Mouse.ButtonUp     -= _mouseUpEventHandler;
                DualityApp.Mouse.Move         -= _mouseMoveEventHandler;
                DualityApp.Mouse.WheelChanged -= _mouseWheelEventHandler;

                DualityApp.Keyboard.KeyDown -= _keyDownEventHandler;
                DualityApp.Keyboard.KeyUp   -= _keyUpEventHandler;
            }
        }
Exemplo n.º 5
0
        void ICmpInitializable.OnShutdown(Component.ShutdownContext context)
        {
            if (context == ShutdownContext.Deactivate && DualityApp.ExecContext != DualityApp.ExecutionContext.Editor)
            {
                DualityApp.Keyboard.KeyDown -= this.Keyboard_KeyDown;

                // Save highscore list to Duality MetaData. Could also use a custom file or modified Duality UserData
                for (int i = 0; i < this.highscore.Count; i++)
                {
                    DualityApp.MetaData.WriteValue("Asteroids/Highscore/Entry" + i, this.highscore[i].Name + '\t' + this.highscore[i].ScoreString);
                }
                DualityApp.SaveMetaData();
            }
        }
Exemplo n.º 6
0
 void ICmpInitializable.OnShutdown(Component.ShutdownContext context)
 {
     if (context == ShutdownContext.Deactivate)
     {
         // Fade out playing loop sounds, if there are any. Clean up!
         if (this.moveSoundLoop != null)
         {
             this.moveSoundLoop.FadeOut(0.5f);
             this.moveSoundLoop = null;
         }
         if (this.dangerSoundLoop != null)
         {
             this.dangerSoundLoop.FadeOut(0.5f);
             this.dangerSoundLoop = null;
         }
     }
 }
Exemplo n.º 7
0
 void ICmpInitializable.OnShutdown(Component.ShutdownContext context)
 {
 }
Exemplo n.º 8
0
 public void OnShutdown(Component.ShutdownContext context)
 {
 }
Exemplo n.º 9
0
 public void OnShutdown(Component.ShutdownContext context)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 10
0
 void ICmpInitializable.OnShutdown(Component.ShutdownContext context)
 {
     Console.WriteLine("Placeholder code.");
 }
Exemplo n.º 11
0
 public void OnShutdown(Component.ShutdownContext context)
 {
     // nothing to do here
 }