Пример #1
0
    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));
    }
Пример #2
0
 public void SetTriggerHitbox(ZoneHitbox hitbox)
 {
     trigger = hitbox;
     if (trigger != null)
     {
         trigger.Init(OnEnterTriggerZone, OnLeaveTriggerZone);
     }
 }
Пример #3
0
    protected IEnumerator DestroyAfterWait(ZoneHitbox to_destroy, float wait)
    {
        yield return(ZoneHitbox.Timer(wait));

        Destroy(to_destroy.gameObject);
    }
Пример #4
0
 public void SetTriggerHitbox(ZoneHitbox hitbox)
 {
     trigger_object.SetTriggerHitbox(hitbox);
 }