FixScaling
This commit is contained in:
parent
463db1b00a
commit
5f6be8e23c
5 changed files with 10 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
||||||
using DangerousD.GameCore.Graphics;
|
using DangerousD.GameCore.Graphics;
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
@ -9,6 +10,10 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
|
||||||
{
|
{
|
||||||
public class Player : LivingEntity
|
public class Player : LivingEntity
|
||||||
{
|
{
|
||||||
|
public Player(Vector2 position): base(position)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
protected override GraphicsComponent GraphicsComponent => throw new NotImplementedException();
|
protected override GraphicsComponent GraphicsComponent => throw new NotImplementedException();
|
||||||
|
|
||||||
public void Kill()
|
public void Kill()
|
||||||
|
|
|
@ -15,8 +15,8 @@ namespace DangerousD.GameCore.GameObjects.MapObjects
|
||||||
|
|
||||||
public TestAnimationDeath(Vector2 position) : base(position)
|
public TestAnimationDeath(Vector2 position) : base(position)
|
||||||
{
|
{
|
||||||
Width = 64;
|
Width =512;
|
||||||
Height = 64;
|
Height = 512;
|
||||||
|
|
||||||
GraphicsComponent.StartAnimation("deathbear");
|
GraphicsComponent.StartAnimation("deathbear");
|
||||||
|
|
||||||
|
|
|
@ -129,6 +129,7 @@ namespace DangerousD.GameCore.Graphics
|
||||||
|
|
||||||
public void DrawAnimation(Rectangle destinationRectangle, SpriteBatch _spriteBatch)
|
public void DrawAnimation(Rectangle destinationRectangle, SpriteBatch _spriteBatch)
|
||||||
{
|
{
|
||||||
|
|
||||||
_spriteBatch.Draw(textures[texturesNames.FindIndex(x => x == currentAnimation.TextureName)],
|
_spriteBatch.Draw(textures[texturesNames.FindIndex(x => x == currentAnimation.TextureName)],
|
||||||
destinationRectangle, sourceRectangle, Color.White);
|
destinationRectangle, sourceRectangle, Color.White);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace DangerousD.GameCore.Levels
|
||||||
{
|
{
|
||||||
public void InitLevel()
|
public void InitLevel()
|
||||||
{
|
{
|
||||||
new Player();
|
//new Player();
|
||||||
var Трава = new GrassBlock(new Vector2(0, 128));
|
var Трава = new GrassBlock(new Vector2(0, 128));
|
||||||
var Death = new TestAnimationDeath(new Vector2(128, 128));
|
var Death = new TestAnimationDeath(new Vector2(128, 128));
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ namespace DangerousD.GameCore
|
||||||
LobbyGUI.Draw(_spriteBatch);
|
LobbyGUI.Draw(_spriteBatch);
|
||||||
break;
|
break;
|
||||||
case GameState.Game:
|
case GameState.Game:
|
||||||
_spriteBatch.Begin();
|
_spriteBatch.Begin(SpriteSortMode.Deferred,null/*,SamplerState.PointClamp*/);
|
||||||
GameManager.Draw(_spriteBatch);
|
GameManager.Draw(_spriteBatch);
|
||||||
_spriteBatch.End();
|
_spriteBatch.End();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue