示例#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);
 }