public override void HandleCollision(Phys_Const.CollisionDir cDir, String meta) { if (cDir == Phys_Const.CollisionDir.LEFT) isMovingLeft = false; else if (cDir == Phys_Const.CollisionDir.RIGHT) isMovingLeft = true; //I got jumped on :( if (cDir == Phys_Const.CollisionDir.UP && meta == "player") { isSquished = true; isDeadly = false; AudioManager.PlaySfx("stomp"); this.Source = new Rectangle(32, 0, 16, 16); } //Plonk'd by a turtle shell if (meta == "turtle") { Collide = false; isDeadly = false; isPlonked = true; vVelocity.Y = -1.0f; vVelocity.X = -1.0f; } }
public override void HandleCollision(Phys_Const.CollisionDir CollDir, String meta) { if (CollDir == Phys_Const.CollisionDir.LEFT) isMovingLeft = false; else if (CollDir == Phys_Const.CollisionDir.RIGHT) isMovingLeft = true; }
/// <summary> /// Collision handling for NPCs, etc /// </summary> /// <param name="CollDir">Direction of the collision</param> /// <param name="meta">Extra data as to what hit me</param> public virtual void HandleCollision(Phys_Const.CollisionDir CollDir, String meta) { return; }
public override void HandleCollision(Phys_Const.CollisionDir CollDir, String meta) { //Remove! Remove = true; }