public LogPlayData(int appSession, JourneyPosition journeyPosition, MiniGameCode miniGameCode, PlayEvent playEvent, PlaySkill playSkill, float score, string additionalData) { AppSession = appSession; Stage = journeyPosition.Stage; LearningBlock = journeyPosition.LearningBlock; PlaySession = journeyPosition.PlaySession; MiniGameCode = miniGameCode; PlayEvent = playEvent; PlaySkill = playSkill; Score = score; AdditionalData = additionalData; Timestamp = GenericHelper.GetTimestampForNow(); }
/// <summary> /// Called when player perform a [gameplay skill action] action during gameplay. . /// </summary> /// <param name="_ability">The ability.</param> /// <param name="_score">The score.</param> public void OnGameplaySkillAction(PlaySkill _ability, float _score) { if (AppConstants.DebugLogInserts) { Debug.Log("pre-log OnGameplaySkillAction " + _ability + " " + _score); } bufferizeLogPlayData(new LogAI.PlayResultParameters() { playEvent = PlayEvent.Skill, skill = _ability, score = _score, }); }
public LogPlayData(int appSession, JourneyPosition journeyPosition, MiniGameCode miniGameCode, PlayEvent playEvent, PlaySkill playSkill, float score) : this(appSession, journeyPosition, miniGameCode, playEvent, playSkill, score, "") { }
public WeightedPlaySkill(PlaySkill skill, float weight) { Skill = skill; Weight = weight; }
// Update is called once per frame void Update() { Player[] _p = new Player[2]; _p[0] = PlayerManager.Instance.m_Players[0]; _p[1] = PlayerManager.Instance.m_Players[1]; if (m_GameState == GameState.GetP1InputSkill) { if (_p[0].m_Speed * _p[0].m_MP < _p[1].m_Speed * _p[1].m_MP) { UIManager.Instance.SetPriority(new Vector3(440, 270, 0)); } else { UIManager.Instance.SetPriority(new Vector3(-440, 270, 0)); } } if (Input.GetMouseButton(1)) { if (m_GameState == GameState.GetP1InputOper) { UIManager.Instance.ClearRange(); m_GameState = GameState.GetP1InputSkill; } if (m_GameState == GameState.GetP2InputOper) { UIManager.Instance.ClearRange(); m_GameState = GameState.GetP2InputSkill; } } if (m_GameState == GameState.GetResult) { UIManager.Instance.ClearMessage(); if (_p[0].m_Speed * _p[0].m_MP + _p[0].m_Skills[P1Skill].m_Skill.Speed * 10000 < _p[1].m_Speed * _p[1].m_MP + _p[1].m_Skills[P2Skill].m_Skill.Speed * 10000) { first = P2Play; second = P1Play; //PlayerManager.Instance.m_Players[1].UseSkill(P2Skill, P2Oper); //PlayerManager.Instance.m_Players[0].UseSkill(P1Skill, P1Oper); } else { first = P1Play; second = P2Play; //PlayerManager.Instance.m_Players[0].UseSkill(P1Skill, P1Oper); //PlayerManager.Instance.m_Players[1].UseSkill(P2Skill, P2Oper); } m_GameState = GameState.P1Playing; } if (m_GameState == GameState.P1Playing) { first(); //debug_show(); } if (m_GameState == GameState.P2Playing) { second(); //debug_show(); } if (m_GameState == GameState.Done) { for (int i = 0; i <= 1; i++) { for (int k = 0; k < _p[i].m_Buff.Count; k++) { Debug.Log("P" + i + "buff " + _p[i].m_Buff[k].Type + " " + _p[i].m_Buff[k].Time); if (--_p[i].m_Buff[k].Time <= 0) { switch (_p[i].m_Buff[k].Type) { case Buff.DefendAndAttack: _p[i].defend.GetComponent <ParticleSystem>().Stop(); break; case Buff.CantDie: _p[i].cantdie.GetComponent <ParticleSystem>().Stop(); break; case Buff.DoubleHarm: _p[i].doubleattack.GetComponent <ParticleSystem>().Stop(); break; } if (_p[i].m_Buff[k].Type == Buff.CantDie) { _p[i].m_HP = 0; } for (int j = 0; j < _p[i].m_Buff.Count; j++) { if (_p[i].m_Buff[j].Type == _p[i].m_Buff[k].Type) { _p[i].m_Buff.RemoveAt(j); } } //_p[i].m_Buff.Remove(_p[i].m_Buff[k]); } //m_GameState = GameState.GetP1InputSkill; } for (int k = 0; k < _p[i].m_Debuff.Count; k++) { Debug.Log("P" + i + "DEbuff " + _p[i].m_Debuff[k].Type + " " + _p[i].m_Debuff[k].Time); if (--_p[i].m_Debuff[k].Time <= 0) { switch (_p[i].m_Debuff[k].Type) { case DeBuff.Dizzy: _p[i].dizzy.GetComponent <ParticleSystem>().Stop(); break; case DeBuff.Blood: _p[i].blood.GetComponent <ParticleSystem>().Stop(); break; case DeBuff.PrePoison: _p[i].poison.GetComponent <ParticleSystem>().Stop(); break; } for (int j = 0; j < _p[i].m_Debuff.Count; j++) { if (_p[i].m_Debuff[j].Type == _p[i].m_Debuff[k].Type) { _p[i].m_Debuff.RemoveAt(j); } } //_p[i].m_Debuff.Remove(_p[i].m_Debuff[k]); } } m_GameState = GameState.GetP1InputSkill; _p[i].m_MP += _p[i].m_MP_RE; if (_p[i].m_MP > _p[i].m_MP_MAX) { _p[i].m_MP = _p[i].m_MP_MAX; } if (_p[i].m_HP > _p[i].m_HP_MAX) { _p[i].m_MP = _p[i].m_HP_MAX; } if (_p[i].m_HP <= 0) { //Debug.Log(_p[i].Opponent.m_ID + "Win"); UIManager.Instance.AddMessage("P" + (_p[i].Opponent.m_ID + 1) + "胜利!"); ChangeScene2.Instance.Winer = "P" + (_p[i].Opponent.m_ID + 1) + "Win"; SceneManager.LoadScene("begin"); } } m_GameState = GameState.GetP1InputSkill; if (_p[0].m_Speed * _p[0].m_MP < _p[1].m_Speed * _p[1].m_MP) { UIManager.Instance.SetPriority(new Vector3(440, 270, 0)); } else { UIManager.Instance.SetPriority(new Vector3(-440, 270, 0)); } } debug_show(); }
public LogPlayData(string _Session, string _PlaySession, MiniGameCode _MiniGame, PlayEvent _PlayEvent, PlaySkill _PlaySkill, float _Score, string _RawData) { this.Session = _Session; this.PlaySession = _PlaySession; this.MiniGame = _MiniGame; this.PlayEvent = _PlayEvent; this.PlaySkill = _PlaySkill; this.Score = _Score; this.RawData = _RawData; this.Timestamp = GenericUtilities.GetTimestampForNow(); }
public LogPlayData(string _Session, string _PlaySession, MiniGameCode _MiniGame, PlayEvent _PlayEvent, PlaySkill _PlaySkill, float _Score) : this(_Session, _PlaySession, _MiniGame, _PlayEvent, _PlaySkill, _Score, "") { }
public PlayResultParameters(PlayEvent playEvent, PlaySkill skill, float score) { this.playEvent = playEvent; this.skill = skill; this.score = score; }