Merge pull request 'feature/move-after-cast-skill' (#277) from feature/move-after-cast-skill into develop
Reviewed-on: https://git.pthub.vn/Unity/perfect-world-unity/pulls/277
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using BrewMonster;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
@@ -83,6 +84,7 @@ public class Joystick : MonoBehaviour, IPointerDownHandler, IDragHandler, IPoint
|
||||
if ((currentSnapped.x == -1 || currentSnapped.x == 1 || currentSnapped.y == -1 || currentSnapped.y == 1) &&
|
||||
currentSnapped != previousSnappedInput)
|
||||
{
|
||||
BMLogger.LogError($"Joystick snapped to: {currentSnapped}");
|
||||
EventBus.Publish(new JoystickPressEvent());
|
||||
}
|
||||
else if (currentSnapped == Vector2.zero && previousSnappedInput != Vector2.zero) {
|
||||
@@ -207,4 +209,4 @@ public class Joystick : MonoBehaviour, IPointerDownHandler, IDragHandler, IPoint
|
||||
|
||||
public enum AxisOptions { Both, Horizontal, Vertical }
|
||||
public struct JoystickPressEvent { }
|
||||
public struct JoystickRealeaseEvent { }
|
||||
public struct JoystickRealeaseEvent { }
|
||||
|
||||
@@ -1339,33 +1339,10 @@ public class CECAttackEvent
|
||||
}
|
||||
public bool UpdateTargetFlag()
|
||||
{
|
||||
// update all targets' bAboutToDie flag
|
||||
|
||||
int nNumTargets = m_targets.Count;
|
||||
for (int i = 0; i < nNumTargets; i++)
|
||||
{
|
||||
TARGET_DATA data = m_targets[i];
|
||||
/*
|
||||
if( data.dwModifier & MOD_DEADLYSTRIKE )
|
||||
{
|
||||
int idTarget = data.idTarget;
|
||||
if (ISNPCID(idTarget))
|
||||
{
|
||||
CECNPC* pNPC = g_pGame->GetGameRun()->GetWorld()->GetNPCMan()->GetNPC(idTarget);
|
||||
if (!pNPC)
|
||||
return true;
|
||||
|
||||
pNPC->SetAboutToDie(true);
|
||||
}
|
||||
else if (ISPLAYERID(idTarget))
|
||||
{
|
||||
CECPlayer* pPlayer = g_pGame->GetGameRun()->GetWorld()->GetPlayerMan()->GetPlayer(idTarget);
|
||||
if (!pPlayer)
|
||||
return true;
|
||||
|
||||
pPlayer->SetAboutToDie(true);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -65,11 +65,13 @@ namespace BrewMonster.Scripts
|
||||
|
||||
// Tick routine
|
||||
public override bool Tick(float dwDeltaTime)
|
||||
{
|
||||
{
|
||||
base.Tick(dwDeltaTime * 1000);
|
||||
|
||||
BMLogger.LogError($" m_OverTimeCnt m_dwCounter:{m_OverTimeCnt.m_dwCounter}, m_dwPeriod:{m_OverTimeCnt.m_dwPeriod} ");
|
||||
if (m_OverTimeCnt.IncCounter(dwDeltaTime * 1000))
|
||||
m_bFinished = true;
|
||||
{
|
||||
BMLogger.LogError($" m_OverTimeCnt finished ");
|
||||
m_bFinished = true; }
|
||||
|
||||
if (m_idTarget != 0)
|
||||
{
|
||||
@@ -126,7 +128,7 @@ namespace BrewMonster.Scripts
|
||||
m_pSkill = pSkill;
|
||||
}
|
||||
|
||||
public bool Match(CECHPWork pWork, int priority, bool isDelayWork)
|
||||
public override bool Match(CECHPWork pWork, int priority, bool isDelayWork)
|
||||
{
|
||||
bool bMatching = false;
|
||||
if (pWork != null && pWork.GetWorkID() == CECHPWork.Host_work_ID.WORK_SPELLOBJECT)
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using BrewMonster;
|
||||
using UnityEngine;
|
||||
|
||||
public class CECCounter
|
||||
{
|
||||
// Thuộc tính
|
||||
protected float m_dwCounter; // Counter
|
||||
protected float m_dwPeriod; // Count period
|
||||
public float m_dwCounter; // Counter
|
||||
public float m_dwPeriod; // Count period
|
||||
|
||||
// Constructor
|
||||
public CECCounter()
|
||||
|
||||
@@ -345,7 +345,8 @@ namespace BrewMonster
|
||||
iWaitTime = pCmd.time + m_pCurSkill.GetExecuteTime();
|
||||
|
||||
CECHPWorkSpell pWork = (CECHPWorkSpell)m_pWorkMan.CreateWork(Host_work_ID.WORK_SPELLOBJECT);
|
||||
|
||||
BMLogger.LogError($"[SKILL_CAST_DEBUG] OnMsgPlayerCastSkill: Created CECHPWorkSpell for skillID={m_pCurSkill.GetSkillID()}, " +
|
||||
$"executeTime={m_pCurSkill.GetExecuteTime()}, waitTime={iWaitTime}");
|
||||
pWork.PrepareCast(pCmd.target, m_pCurSkill, iWaitTime);
|
||||
m_pWorkMan.StartWork_p1(pWork);
|
||||
// Debug.Log($"[SKILL_CAST_DEBUG] OnMsgPlayerCastSkill: OBJECT_CAST_SKILL - Created WORK_SPELLOBJECT, " +
|
||||
|
||||
+36
-9
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user