Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Microsoft.Xna.Framework;
- using Microsoft.Xna.Framework.Graphics;
- namespace GameBase
- {
- class Entity
- {
- public Entity nextEntity;
- public Texture2D texture;
- public bool isActive;
- public Vector2 rotationXY;
- public Vector2 positionXY;
- public float rotationDEG;
- public float velocity;
- public Vector2 velocityXY;
- public Entity()
- {
- nextEntity = null;
- isActive = true;
- }
- public virtual void Update(GameTime gameTime)
- {
- Entity stepEntity = this.nextEntity;
- if (nextEntity != null)
- {
- while (stepEntity != null)
- {
- stepEntity.Update(gameTime);
- stepEntity = stepEntity.nextEntity;
- }
- }
- }
- public virtual void Draw(SpriteBatch spriteBatch)
- {
- Entity stepEntity = this.nextEntity;
- if (nextEntity != null)
- {
- while (stepEntity != null)
- {
- stepEntity.Draw(spriteBatch);
- stepEntity = stepEntity.nextEntity;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement