//This will be turned into a delegate, with functionality specified from the current moveset (found in the moveset module) IEnumerator ActivateWeapon_EnterState() { anim.material.color = Color.green; Debug.Log("The current state is:" + currentState); Debug.Log("The user's current state is:" + userState.currentState); Debug.Log("The last state is:" + lastState); Debug.Log("The users last state is:" + userState.lastState); switch (userState.lastState.ToString()) { //Character is idle or walking case "Idle": case "Walk": currentState = EquipmentActions.StartPrimary; break; //Character is running case "Run": currentState = EquipmentActions.RunAttack; break; //Character is dodging case "Dodge": currentState = EquipmentActions.DodgeAttack; break; case "StartPrimary": case "Combo2": case "Combo3": followup = FollowupType.Primary; Return(); break; default: currentState = EquipmentActions.Idle; break; //Character is in the middle of combo1 //Character is in the middle of combo2 //Character is in the middle of combo3 } yield return(new WaitForSeconds(1)); Debug.LogWarning("Preparing to return from weapon call"); // Return (); }
//This will be turned into a delegate, with functionality specified from the current moveset (found in the moveset module) IEnumerator ActivateWeapon_EnterState() { anim.material.color = Color.green; Debug.Log ("The current state is:"+currentState); Debug.Log ("The user's current state is:"+userState.currentState); Debug.Log ("The last state is:"+lastState); Debug.Log ("The users last state is:"+userState.lastState); switch (userState.lastState.ToString ()) { //Character is idle or walking case "Idle": case "Walk": currentState = EquipmentActions.StartPrimary; break; //Character is running case "Run": currentState = EquipmentActions.RunAttack; break; //Character is dodging case "Dodge": currentState = EquipmentActions.DodgeAttack; break; case "StartPrimary": case "Combo2": case "Combo3": followup = FollowupType.Primary; Return (); break; default: currentState = EquipmentActions.Idle; break; //Character is in the middle of combo1 //Character is in the middle of combo2 //Character is in the middle of combo3 } yield return new WaitForSeconds (1); Debug.LogWarning ("Preparing to return from weapon call"); // Return (); }
//will check for whether a followup was signaled, and branch the combo into the next branch, and play the appropriate animation (swing followthrough or a second strike) protected void StartPrimary_ExitState() { followup = FollowupType.None; }
protected void RunAttack_ExitState() { followup = FollowupType.None; }
protected IEnumerator Combo4_ExitState() { followup = FollowupType.None; yield break; }
protected void DodgeAttack_ExitState() { followup = FollowupType.None; }