Beispiel #1
0
 private void Start()
 {
     if (!projectileControl)
     {
         projectileControl = GetComponent <vProjectileControl>();
     }
 }
Beispiel #2
0
        public void OnInstantiateProjectile(vProjectileControl pCtrl)
        {
            if (!weapon)
            {
                return;
            }
            var arrow = pCtrl.GetComponent <vArrow>();

            if (arrow)
            {
                arrow.penetration = Mathf.Lerp(minPenetration, maxPenetration, weapon.powerCharge);
            }
        }
Beispiel #3
0
 protected virtual vProjectileControl CreateProjectileData(Vector3 aimPosition, float velocityChanged, Vector3 dispersionDir, vProjectileControl pCtrl)
 {
     pCtrl.instantiateData = new vProjectileInstantiateData
     {
         aimPos = aimPosition,
         dir    = dispersionDir,
         vel    = velocityChanged
     };
     return(pCtrl);
 }