diff --git a/ZoFo/GameCore/GameObjects/Entity.cs b/ZoFo/GameCore/GameObjects/Entity.cs index 3f3c663..8653521 100644 --- a/ZoFo/GameCore/GameObjects/Entity.cs +++ b/ZoFo/GameCore/GameObjects/Entity.cs @@ -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) - { - - } -} +} \ No newline at end of file diff --git a/ZoFo/GameCore/GameObjects/LivingEntity.cs b/ZoFo/GameCore/GameObjects/LivingEntity.cs index 44270fa..663a411 100644 --- a/ZoFo/GameCore/GameObjects/LivingEntity.cs +++ b/ZoFo/GameCore/GameObjects/LivingEntity.cs @@ -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); + } + } }