示例#1
0
    public override void FixedUpdate()
    {
        base.FixedUpdate();
        Entity entity = target.GetComponent <Entity>();

        if (mellee.attackCollider.list.Contains(entity))
        {
            mellee.Attack();
        }
    }
示例#2
0
 void EnemyAttack()
 {
     if (targetEntity)
     {
         if (mellee.attackCollider.list.Contains(targetEntity))
         {
             mellee.Attack();
         }
         else
         {
             if (shooter)
             {
                 shooter.Attack();
             }
         }
     }
 }