using System; namespace Ougge; public abstract class Component { private GameObject _gameObject; internal Component(GameObject gameObject) { _gameObject = gameObject; } public GameObject Owner { get => _gameObject.IsDestroyed ? throw new Exception("GameObject") : _gameObject; } public virtual void Update(double deltaTime) {} }