/// <summary> /// Verifica si el jugador tomo o no la vida y modifica el atributo LiveTaked /// </summary> /// <param name="characterBoundingbox"></param> public void takeLive(Core.BoundingVolumes.TgcBoundingAxisAlignBox characterBoundingbox) { if (isColliding(characterBoundingbox) && liveQuantity == 0) { liveQuantity = 1; LiveTaked = true; } }
/// <summary> /// Verifica si hay colision entre el personaje y el modelo de vida /// </summary> /// <param name="characterBoundingbox"></param> /// <returns></returns> public bool isColliding(Core.BoundingVolumes.TgcBoundingAxisAlignBox characterBoundingbox) { return(Core.Collision.TgcCollisionUtils.testAABBAABB(characterBoundingbox, tgcBotHead.BoundingBox)); }