public override void OnExit()
 {
     UpdateMgr.RemoveAll();
     DrawMgr.RemoveAll();
     AudioMgr.StopBGMClip();
     IsPlaying = false;
 }
Exemplo n.º 2
0
 public override void OnExit()
 {
     DrawMgr.RemoveAll();
     //UpdateMgr.RemoveAll();
     AudioMgr.StopBGMClip();
     base.OnExit();
 }
Exemplo n.º 3
0
 public virtual void Destroy()
 {
     IsActive = false;
     UpdateMgr.Remove(this);
     DrawMgr.Remove(this);
     //if (Rigidbody != null)
     //    PhysicsMgr.Remove(Rigidbody);
 }
 public override void OnDie()
 {
     IsActive = false;
     UpdateMgr.Remove(this);
     DrawMgr.Remove(this);
     //RemoveRigidbody();
     Rigidbody.SetDebugCircle(false);
     //PhysicsMgr.Remove(Rigidbody);
     BulletMgr.RecoverBullet(this);
     Owner = null;
 }
        public Ray(Vector2 origin, Vector2 direction)
        {
            Origin    = origin;
            Direction = direction;

            layer = DrawMgr.Layer.Foreground;

            Redpoint          = new Sprite(5, 5);
            Redpoint.pivot    = new Vector2(2.5f, 2.5f);
            Redpoint.position = Origin;

            DrawMgr.Add(this);
        }
Exemplo n.º 6
0
        public TextChar(Vector2 pos, char ch, Font font) : base(pos, font.TextureName, DrawMgr.Layer.GUI)
        {
            this.font = font;
            charW     = this.font.CharW;
            charH     = this.font.CharH;
            scale     = font.Scale;

            Sprite        = new Sprite(charW * scale, charH * scale);
            Position      = pos;
            Sprite.pivot  = new Vector2(Sprite.Width / 2, Sprite.Height / 2);
            Sprite.Camera = CameraMgr.GetCamera("GUI");

            Character = ch;
            UpdateMgr.Add(this);
            DrawMgr.Add(this);
        }
Exemplo n.º 7
0
 public override void Draw()
 {
     DrawMgr.Draw();
 }
Exemplo n.º 8
0
 public virtual void Create()
 {
     UpdateMgr.Add(this);
     DrawMgr.Add(this);
 }
 public override void Draw()
 {
     DrawMgr.Draw();
     //gameoverSpr.DrawTexture(gameoverTex);
 }
Exemplo n.º 10
0
 public override void OnExit()
 {
     DrawMgr.RemoveAll();
     IsPlaying = false;
 }