Esempio n. 1
0
    private void OnRotationEnds()
    {
//        Debug.Log("OnRotationEnds " + isPlayAttack);
        if (shootContainer != null)
        {
            var can = curWeapon.CanShoot();
            if (can && !isPlayAttack)
            {
                base.TryAttack(shootContainer.dir);
            }
            shootContainer = null;
        }
    }
Esempio n. 2
0
 private void subTR(Vector3 target,Vector3 dir)
 {
     if (isPlayAttack)
     {
         rotateContainer = new RotateContainer(target);
     }
     else
     {
         heorControl.SetLookDir(dir);
         shootContainer = new ShootContainer(dir);
     }
 }
Esempio n. 3
0
File: Hero.cs Progetto: Kinderril/p3
    private void subTR(Vector3 target,Vector3 dir,float additionalPower)
    {
        if (isPlayAttack)
        {
            rotateContainer = new RotateContainer(target);
        }
        else
        {
#if UNITY_EDITOR
            Debug.DrawRay(transform.position, dir * 5, Color.green, 2);
#endif
            heorControl.SetLookDir(dir);
            shootContainer = new ShootContainer(dir, additionalPower);
        }
    }