Esempio n. 1
0
        ///──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
        /// <summary> This method is used to activate the AIM mode when the right click is pressed</summary>
        public virtual void SetHorizontalAngle()
        {
            if (!Aimer.Active)
            {
                Aimer.Calculate();                                                                        //Recalculate when the Aimer is not Active
            }
            float NewHorizontalAngle = Aimer.HorizontalAngle / 180;                                       //Get the Normalized value for the look direction

            HorizontalAngle = Mathf.Lerp(HorizontalAngle, NewHorizontalAngle, Time.fixedDeltaTime * 10f); //Smooth Swap between 1 and -1
            SetFloatParameter(Hash_WAim, HorizontalAngle);
        }
Esempio n. 2
0
 /// <summary> Start the Main Attack Logic </summary>
 public virtual void MainAttack()
 {
     if (WeaponIsActive)
     {
         if (!Aimer.Active)
         {
             Aimer.Calculate();                //Quick Aim Calculation in case the Aimer is Disabled
         }
         Weapon.MainAttack_Start(this);
         OnMainAttackStart.Invoke(Weapon.gameObject);
     }
 }