コード例 #1
0
 public void Enter()
 {
     shootAndRaise = true;
     transitionID  = this.currentID;
     elapsedTime   = 0f;
     animator.SetBool(isHoldTimeoutHash, false);
 }
コード例 #2
0
 public ERangedAttackID CheckTransition()
 {
     if (elapsedTime > holdWeaponInfo.HoldTime)
     {
         animator.SetBool(isHoldTimeoutHash, true);
         transitionID  = ERangedAttackID.LayDown;
         shootAndRaise = false;
         return(transitionID);
     }
     else if (control.InputInfo.IsAttackingRanged && !control.InputInfo.IsReloadEnabled &&
              invertoryLogic.InputInfo.CurrentWeapons.CurrentRangedWeapon.CanShoot)
     {
         transitionID  = ERangedAttackID.Shoot;
         shootAndRaise = false;
         return(transitionID);
     }
     else if (control.InputInfo.IsReloadEnabled && !control.InputInfo.IsAttackingRanged &&
              invertoryLogic.InputInfo.CurrentWeapons.CurrentRangedWeapon.IsReloadEnabled)
     {
         transitionID = ERangedAttackID.Reload;
         return(transitionID);
     }
     else
     {
         return(this.currentID);
     }
 }
コード例 #3
0
ファイル: LaydownState.cs プロジェクト: dvd906/BscThesis
 public LaydownState(bool conCurrentCanRun, ref IRangedCombatLogic control, ERangedAttackID currentID, ref IInvertoryLogic invertoryLogic)
 {
     this.conCurrentCanRun = conCurrentCanRun;
     this.control          = control;
     this.currenStateID    = currentID;
     this.invertoryLogic   = invertoryLogic;
 }
コード例 #4
0
 public ShootState(bool canConcurentRun, ERangedAttackID currentStateID, ref IRangedCombatLogic control,
                   ref Animator animator, ref IInvertoryLogic invertoryLogic)
 {
     this.canConcurentRun = canConcurentRun;
     this.currentStateID  = currentStateID;
     this.control         = control;
     this.animator        = animator;
     this.invertoryLogic  = invertoryLogic;
 }
コード例 #5
0
 // TODO: weapon Invertory current weapon ref InvertoryWeapons
 public ReloadState(bool conCurrentCanRun, ref IRangedCombatLogic control, ERangedAttackID currentID,
                    ref IInvertoryLogic invertoryLogic, ref Animator animator)
 {
     this.conCurrentCanRun = conCurrentCanRun;
     this.control          = control;
     this.currentID        = currentID;
     this.invertoryLogic   = invertoryLogic;
     this.animator         = animator;
 }
コード例 #6
0
 public HoldState(bool canConcurrentRun, ref IRangedCombatLogic control, ERangedAttackID currentID,
                  ref IHoldWeapon holdWeaponInfo, ref Animator animator, ref IInvertoryLogic invertoryLogic)
 {
     this.canConcurrentRun = canConcurrentRun;
     this.control          = control;
     this.currentID        = currentID;
     this.animator         = animator;
     this.holdWeaponInfo   = holdWeaponInfo;
     this.invertoryLogic   = invertoryLogic;
 }