Beispiel #1
0
 public void ChangeGameObjectState(GameObject_State GO_S)
 {
     if (GameObjectState != GameObject_State.Death)
     {
         GameObjectState = GO_S;
     }
 }
Beispiel #2
0
 protected AbstractGameObject(ContentManager c, string objektName, int updateDelay, Vector2 spawnPosition)
 {
     ObjectName                = objektName;
     Animations                = new Dictionary <Animation_State, Animation>();
     SpawnPoint                = spawnPosition;
     ActiveAnimation           = Animation_State.idle;
     GameObjectState           = GameObject_State.Air;
     Position                  = spawnPosition;
     Velocity                  = Vector2.Zero;
     Hitbox                    = c.Load <Texture2D>(objektName + "hitbox");
     UpdateDelay               = updateDelay;
     UpdateCounter             = 0;
     WaitCounter               = 0;
     LockAnimationStateCounter = 0;
     AnimationChanged          = false;
     PositionRectangle         = new Rectangle((int)Position.X, (int)Position.Y, Hitbox.Width, Hitbox.Height);
     HitboxOffset              = new Point(Hitbox.Width / 2, Hitbox.Height / 2);
     Active                    = true;
 }