Element.cs 755 B

123456789101112131415161718192021222324252627
  1. namespace fun.Core
  2. {
  3. /// <summary>
  4. /// This class exists to ensure entitys uniqueness.
  5. /// </summary>
  6. public class Element
  7. {
  8. protected readonly Environment environment;
  9. protected readonly Entity entity;
  10. /// <summary>
  11. /// Creates an element-Object.
  12. /// </summary>
  13. /// <param name="environment">environment of our entity</param>
  14. /// <param name="entity">element of our element</param>
  15. public Element(Environment environment, Entity entity)
  16. {
  17. this.environment = environment;
  18. this.entity = entity;
  19. }
  20. // Basic methods
  21. public virtual void Initialize() { }
  22. public virtual void Update(double time) { }
  23. }
  24. }