protected void CreateZone() { ZoneHitbox new_zone = Instantiate(zone_prefab, PlayerController.GetMousePosition(), Quaternion.identity); new_zone.Init(OnHit, OnEnter, OnLeave, tick_rate); StartCoroutine(DestroyAfterWait(new_zone, zone_length)); }
public void SetTriggerHitbox(ZoneHitbox hitbox) { trigger = hitbox; if (trigger != null) { trigger.Init(OnEnterTriggerZone, OnLeaveTriggerZone); } }
protected IEnumerator DestroyAfterWait(ZoneHitbox to_destroy, float wait) { yield return(ZoneHitbox.Timer(wait)); Destroy(to_destroy.gameObject); }
public void SetTriggerHitbox(ZoneHitbox hitbox) { trigger_object.SetTriggerHitbox(hitbox); }