LivingEntityRework
This commit is contained in:
parent
6c75e9294b
commit
2ebbf450e7
2 changed files with 26 additions and 40 deletions
|
@ -1,42 +1,5 @@
|
|||
using System;
|
||||
using ZoFo.GameCore.GameObjects;
|
||||
using Microsoft.Xna.Framework.Content;
|
||||
|
||||
namespace ZoFo.GameCore.GameObjects;
|
||||
namespace ZoFo.GameCore.GameObjects;
|
||||
public class Entity : GameObject
|
||||
{
|
||||
public int Id{ get; set; }
|
||||
//public CollisionComponent collisionComponents{ get; set; }
|
||||
//public AnimationComponent animationComponent{ get; set; }
|
||||
{
|
||||
|
||||
// в апдейте может заявляет изменения позиции
|
||||
public void UpdateLogic()
|
||||
{
|
||||
using System.Numerics;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Методы для клиента
|
||||
public void UpdateAnimation()
|
||||
{
|
||||
|
||||
public class Entity
|
||||
{
|
||||
Vector2 position;
|
||||
public Entity(Vector2 position)
|
||||
{
|
||||
this.position = position;
|
||||
}
|
||||
public virtual void SetPosition(Vector2 position)
|
||||
{
|
||||
Vector2 pos = position;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void Draw(ContentManager manager)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,5 +3,28 @@
|
|||
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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue