using BrewMonster.Scripts; using CSNetwork.GPDataType; using UnityEngine; public class CECModel { private const uint COMACT_FLAG_MODE_NONE = 0; //protected CECModelStaticData m_pMapModel; public void ClearComActFlag(bool bSignalCurrent) { ClearComActFlag(0, bSignalCurrent); } public void ClearComActFlag(int nChannel, bool bSignalCurrent) { /* ChannelAct & ca = m_ChannelActs[nChannel]; ChannelActNode* pNode = ca.GetHighestRankNode(); if (pNode) { if (pNode->m_pActFlag && bSignalCurrent) *pNode->m_pActFlag = true; //ca.m_dwFlagMode = COMACT_FLAG_MODE_NONE; pNode->m_pActFlag = NULL; }*/ } public bool QueueAction(CECNPC.INFO iNFO, string szActName, ref bool pNewActFlag, int nTransTime = 200, uint dwUserData = 0, bool bForceStopPrevAct = false, bool bCheckTailDup = false, bool bNoFx = false, bool bResetSpeed = false /*joslian*/, bool bResetActFlag = false, uint dwNewFlagMode = COMACT_FLAG_MODE_NONE) { QueueAction(iNFO, 0, szActName, ref bResetActFlag, nTransTime, dwUserData, bForceStopPrevAct, bCheckTailDup, bNoFx, bResetSpeed/*joslian*/, pNewActFlag, dwNewFlagMode); return true; } public bool QueueAction(CECNPC.INFO iNFO, int nChannel, string szActName, ref bool pNewActFlag, int nTransTime, uint dwUserData/* 0 */, bool bForceStopPrevAct, bool bCheckTailDup, bool bNoFx, bool bResetSpeed /*joslian*/, bool bResetActFlag, uint dwNewFlagMode) { EventBus.PublishChannel(iNFO.nid, new QueueNPCActionEvent(szActName)); return true; } public struct QueueNPCActionEvent { public string AnimationName; public QueueNPCActionEvent(string animationName) { AnimationName = animationName; } } public void PlayGfx(string szPath, string szHook, float fScale, bool bFadeOut, A3DVECTOR3 vOffset, float fPitch, float fYaw, float fRot, bool bUseECMHook, uint dwFadeOutTime) { if (!bFadeOut) dwFadeOutTime = 0; string strKey = szPath; strKey += szHook; // var vfxPrefab = AddressableManager.Instance.LoadPrefabAsync(szPath).Result; var testVfx = CECGameRun.Instance.GetTestVfx(); testVfx.name = "PlayGfx"; testVfx.transform.position = new Vector3(vOffset.x, vOffset.y, vOffset.z); // PGFX_INFO pInfo; // // CoGfxMap::iterator it = m_CoGfxMap.find(strKey); // if (bUseECMHook) { // if (CECModelHook* pHook = GetECMHook(szHook)) // { // fScale *= pHook->GetScaleFactor(); // } // } // // if (it != m_CoGfxMap.end()) // { // pInfo = it->second; // A3DGFXEx* pGfx = pInfo->GetGfx(); // TransferEcmProperties(pGfx); // pGfx->SetScale(fScale * m_fGfxScaleFactor); // pInfo->SetFadeOutTime(dwFadeOutTime); // pInfo->SetModelAlpha(true); // pInfo->SetHookName(szHook); // pInfo->SetUseECMHook(bUseECMHook); // pInfo->SetScale(fScale); // pInfo->SetOffset(vOffset); // pInfo->SetPitch(fPitch); // pInfo->SetYaw(fYaw); // pInfo->SetRot(fRot); // pInfo->BuildTranMat(); // pGfx->SetSfxPriority(m_nSfxPriority); // pGfx->Start(true); // return; // } // // pInfo = new GFX_INFO(NULL); // pInfo->SetFilePath(szPath); // pInfo->SetHookName(szHook); // pInfo->SetUseECMHook(bUseECMHook); // pInfo->SetScale(fScale); // pInfo->Init(m_pA3DDevice); // pInfo->SetOffset(vOffset); // pInfo->SetPitch(fPitch); // pInfo->SetYaw(fYaw); // pInfo->SetRot(fRot); // pInfo->LoadGfx(); // // if (!pInfo->GetGfx()) // { // delete pInfo; // return; // } // // pInfo->BuildTranMat(); // pInfo->SetFadeOutTime(dwFadeOutTime); // pInfo->SetModelAlpha(true); // TransferEcmProperties(pInfo->GetGfx()); // pInfo->GetGfx()->SetScale(fScale * m_fGfxScaleFactor); // pInfo->GetGfx()->SetSfxPriority(m_nSfxPriority); // pInfo->GetGfx()->Start(true); // // m_CoGfxMap[strKey] = pInfo; } } // Action channel public enum ActionChannel { ACTCHA_WOUND = 1, };