Exemplo 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;
        }
    }
Exemplo n.º 2
0
 private void subTR(Vector3 target,Vector3 dir)
 {
     if (isPlayAttack)
     {
         rotateContainer = new RotateContainer(target);
     }
     else
     {
         heorControl.SetLookDir(dir);
         shootContainer = new ShootContainer(dir);
     }
 }
Exemplo n.º 3
0
Arquivo: Hero.cs Projeto: 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);
        }
    }