private void LogCounters() { m_CurrentWriter.WriteLine("Move/s: {0}, FilteredMove/s: {1}, PercentFiltered: {2}", m_TmpMoveCounter, m_TmpFiltMoveCounter, (float)m_TmpFiltMoveCounter / (float)(m_TmpFiltMoveCounter + m_TmpMoveCounter) ); m_LogCounter--; if (m_Dynmode && m_LogCounter == 5) { RequestOperations.DistractingShotRequest(new Vector3(1F, 0, 1F)); } if (m_LogCounter == 0) { FinishLogging(); } }
private void SkillCalled(ActionCode skill) { // TODO: Refactor with strategy pattern. //No target skills switch (skill) { case ActionCode.Dash: RequestOperations.DashRequest(); break; case ActionCode.HammerBash: var hbAction = new Action(() => CastSkill(skill, Vector3.back, 1f)); ResponseOperations.AddActionToResponseWaitinglist(skill, hbAction); RequestOperations.HammerBashRequest(); break; } //Character target skills switch (skill) { case ActionCode.DistractingShot: var mousePoint = InputExtension.GetMouseHitGroundPoint(); if (mousePoint == null) { return; } var forwardVec = mousePoint.Value - m_Player.transform.position; forwardVec = forwardVec.normalized; var dsAction = new Action(() => CastSkill(skill, mousePoint.Value, 0.5f)); ResponseOperations.AddActionToResponseWaitinglist(skill, dsAction); RequestOperations.DistractingShotRequest(forwardVec); break; case ActionCode.OrisonOfHealing: if (GameData.Target != null || m_TargetSelector.SetTarget()) { var oohAction = new Action(() => CastSkill(skill, GameData.Target.transform.position, 1f)); ResponseOperations.AddActionToResponseWaitinglist(skill, oohAction); RequestOperations.OrisonOfHealingRequest(GameData.Target.name); //CastSkill(skill, GameData.Target.transform.position, 1f); } break; } //Mouse position as target skills switch (skill) { case ActionCode.FireStorm: var mousePoint = InputExtension.GetMouseHitGroundPoint(); if (mousePoint == null) { return; } var action = new Action(() => CastSkill(skill, mousePoint.Value, 2f)); ResponseOperations.AddActionToResponseWaitinglist(skill, action); RequestOperations.FireStormRequest(mousePoint.Value); break; } }