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