smallEdit

This commit is contained in:
unknown 2024-08-15 17:17:25 +03:00
parent 2ebbf450e7
commit f3c2220769
2 changed files with 43 additions and 25 deletions

View file

@ -1,5 +1,33 @@
namespace ZoFo.GameCore.GameObjects;
public class Entity : GameObject
{
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
}
namespace ZoFo.GameCore.GameObjects
{
public abstract class Entity : GameObject
{
public int Id { get; set; }
public void CollisionComponent()
{
}
public void AnimationComponent()
{
}
public void UpdateLogic()
{
}
}
}
//вектор
//вилосити
//поситион
//текстура

View file

@ -1,30 +1,20 @@
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
namespace ZoFo.GameCore.GameObjects;
public class LivingEntity : Entity
{
public bool isOnGround = true;
public Vector2 velocity;
public Vector2 acceleration;
public Vector2 Acceleration { get; private set; }
public LivingEntity(Vector2 position) : base(position)
public Vector2 position;
public void TextureLoad(SpriteBatch spriteBatch)
{
acceleration = new Vector2(0, 30);
}
public override void SetPosition(Vector2 position)
{
_pos = position;
}
public override void Update(GameTime gameTime)
{
base.Update(gameTime);
}
public virtual void StartCicycleAnimation(string animationName)
{
if (GraphicsComponent.GetCurrentAnimation != animationName)
{
GraphicsComponent.StartAnimation(animationName);
}
}
}