Beispiel #1
0
 protected override void OnAwake()
 {
     base.OnAwake();
     last_attack = Time.time - time_between_attacks;
     hitbox.Init(OnAttackHit, .2f);
     turn_speed = 90f;
 }
    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));
    }
Beispiel #3
0
 public void SetTriggerHitbox(ZoneHitbox hitbox)
 {
     trigger = hitbox;
     if (trigger != null)
     {
         trigger.Init(OnEnterTriggerZone, OnLeaveTriggerZone);
     }
 }
Beispiel #4
0
 protected virtual void Awake()
 {
     hitbox.Init(OnHit, OnZoneEnter, OnZoneExit, tick_rate);
 }