private void Start() { control = GetComponent <IGameObjectDamageTaker>(); if (control == null) { throw new System.Exception("This GameObject doesnt have a IGameObjectDamageTaker and can thus not recieve physical damage."); } }
private void Start() { damageTaker = GetComponent <IGameObjectDamageTaker>(); if (damageTaker == null) { Debug.LogError("FallDamageTaker is on a GameObject that cannot take damage."); Destroy(this); } }