private void UpdateMoveState() { if (bDie) { return; } if (m_CombatProps.isSleep()) { return; } if (!isLocalPlayer) { return; } //Move(Mess or Normal) if (m_CombatProps.isMess()) { m_CombatProps.MessRun(ref h, ref v); } else { getMoveInput(ref h, ref v); } m_MoveDir = new Vector2(h, v); //run state if (h == 0 && v == 0) { bRun = false; } else { bRun = true; } }
//================================================================= //Combat rec here //================================================================= public void recAttack(KBEngine.Role e, int attackType, float damage) { if (e.renderObj == null) { return; } GameObject player = e.renderObj as GameObject; GameObject dp = (GameObject)Instantiate(damagePopupObliPref, player.transform.position, Quaternion.identity); dp.GetComponent <ValuePopup>().m_Player = player; dp.GetComponent <ValuePopup>().m_Value = (int)damage; CombatProps cp = player.GetComponent <CombatProps>(); if (cp == null) { return; } switch ((AttackType)attackType) { case AttackType.Normal: break; case AttackType.Frozen: if (!cp.isInFrozenDBuff) { cp.inFrozenDBuff(); } break; case AttackType.Strong: if (!cp.isSleep()) { Instantiate(sleepEffect, player.transform.position, player.transform.rotation, player.transform); cp.inSleepDBuff(); } break; case AttackType.Shadow: if (!cp.isMess()) { Instantiate(messEffect, player.transform.position, player.transform.rotation, player.transform); cp.inMessDBuff(); } break; } }