Exemplo n.º 1
0
 public virtual void RemoveRigidbody()
 {
     if (Rigidbody != null)
     {
         PhysicsMgr.Remove(Rigidbody);
     }
 }
 public RigidBody(Vector2 pos, GameObject owner, Circle bCircle = null, Rect bBox = null, bool createbBox = true)
 {
     Position = pos;
     Owner    = owner;
     AddCollider(bCircle, bBox, createbBox);
     CollisionAffection = true;
     PhysicsMgr.Add(this);
 }
        public RigidBody(Vector2 pos, GameObject owner)
        {
            Position = pos;
            Owner    = owner;

            CollisionAffection = true;
            PhysicsMgr.Add(this);
        }
 public virtual void Spawn(Ship owner, Vector2 pos, Vector2 offset, Vector2 dir, float vel)
 {
     Owner    = owner;
     Rotation = owner.Rotation;
     Position = pos + offset;
     Velocity = vel * dir;
     IsActive = true;
     Create();
     PhysicsMgr.Add(Rigidbody);
     Rigidbody.SetDebugCircle(true);
 }
Exemplo n.º 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();
        }