public override void OnExit()
 {
     UpdateMgr.RemoveAll();
     DrawMgr.RemoveAll();
     AudioMgr.StopBGMClip();
     IsPlaying = false;
 }
Beispiel #2
0
 public virtual void Destroy()
 {
     IsActive = false;
     UpdateMgr.Remove(this);
     DrawMgr.Remove(this);
     //if (Rigidbody != null)
     //    PhysicsMgr.Remove(Rigidbody);
 }
Beispiel #3
0
        public override void Update()
        {
            currentTime += Game.window.deltaTime;

            UpdateMgr.Update();

            if (currentTime >= totalTime)
            {
                OnExit();
            }
        }
 public override void OnDie()
 {
     IsActive = false;
     UpdateMgr.Remove(this);
     DrawMgr.Remove(this);
     //RemoveRigidbody();
     Rigidbody.SetDebugCircle(false);
     //PhysicsMgr.Remove(Rigidbody);
     BulletMgr.RecoverBullet(this);
     Owner = null;
 }
Beispiel #5
0
        public override void Update()
        {
            ScorePointsSystem.GameTimeUpdate(Game.window.deltaTime);
            EnemyMgr.Update();

            if (IsPlayerAlive)
            {
                AudioMgr.Update("Game_ST");
            }
            UpdateMgr.Update();
            PhysicsMgr.Update();
            PhysicsMgr.CheckCollision();
            CameraMgr.Update();
        }
Beispiel #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);
        }
 public virtual void EndEffect()
 {
     UpdateMgr.Remove(this);
 }
 public virtual void BeginEffect()
 {
     CurrentTime = 0;
     UpdateMgr.Add(this);
 }
Beispiel #9
0
 public virtual void Create()
 {
     UpdateMgr.Add(this);
     DrawMgr.Add(this);
 }
 public override void Update()
 {
     UpdateMgr.Update();
 }
 public void End()
 {
     UpdateMgr.Remove(this);
     TimeMgr.RemoveTimer(this);
 }
 public void Resume()
 {
     UpdateMgr.Add(this);
 }
 public void Pause()
 {
     UpdateMgr.Remove(this);
 }
 public void Start()
 {
     Reset();
     UpdateMgr.Add(this);
 }