update hover vfx
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b19f4ea7b65a3f641abb61aafd8ba0fe
|
||||
@@ -8,7 +8,7 @@ ScriptedImporter:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
|
||||
generateWrapperCode: 0
|
||||
generateWrapperCode: 1
|
||||
wrapperCodePath:
|
||||
wrapperClassName:
|
||||
wrapperCodeNamespace:
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &4029439430316340095
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 2232743197522067124, guid: f3a1a6186688c0a43a83e5301ae63bb5, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2232743197522067124, guid: f3a1a6186688c0a43a83e5301ae63bb5, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2232743197522067124, guid: f3a1a6186688c0a43a83e5301ae63bb5, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2232743197522067124, guid: f3a1a6186688c0a43a83e5301ae63bb5, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2232743197522067124, guid: f3a1a6186688c0a43a83e5301ae63bb5, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2232743197522067124, guid: f3a1a6186688c0a43a83e5301ae63bb5, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2232743197522067124, guid: f3a1a6186688c0a43a83e5301ae63bb5, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2232743197522067124, guid: f3a1a6186688c0a43a83e5301ae63bb5, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: -90
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2232743197522067124, guid: f3a1a6186688c0a43a83e5301ae63bb5, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2232743197522067124, guid: f3a1a6186688c0a43a83e5301ae63bb5, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4502962325606181486, guid: f3a1a6186688c0a43a83e5301ae63bb5, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: "\u9F20\u6807\u60AC\u6D6E Variant"
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents:
|
||||
- targetCorrespondingSourceObject: {fileID: 4502962325606181486, guid: f3a1a6186688c0a43a83e5301ae63bb5, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 1557245198507093151}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: f3a1a6186688c0a43a83e5301ae63bb5, type: 3}
|
||||
--- !u!1 &690965750815136017 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 4502962325606181486, guid: f3a1a6186688c0a43a83e5301ae63bb5, type: 3}
|
||||
m_PrefabInstance: {fileID: 4029439430316340095}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &1557245198507093151
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 690965750815136017}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9dcde7b030da4a94a9b5c05323a411bf, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_vfx: {fileID: 3377335678319547738}
|
||||
_lifeTime: -1
|
||||
_isLoopVfx: 1
|
||||
m_iState: 0
|
||||
--- !u!198 &3377335678319547738 stripped
|
||||
ParticleSystem:
|
||||
m_CorrespondingSourceObject: {fileID: 1816574868192781861, guid: f3a1a6186688c0a43a83e5301ae63bb5, type: 3}
|
||||
m_PrefabInstance: {fileID: 4029439430316340095}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23c524cd6f7fb27449cee2b10668fdd7
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -29,6 +29,7 @@ public abstract class CECPlayer : CECObject
|
||||
protected float rotationSpeed = 5;
|
||||
internal int m_iMoveMode; // Player's move mode
|
||||
[SerializeField] internal int m_idSelTarget;
|
||||
[SerializeField] internal int m_idCurHover; // ID of object under cursor
|
||||
protected int m_iShape; // Ñ¡ÖÐÄ¿±êµÄID
|
||||
protected uint m_dwStates; // Player's basic states
|
||||
protected uint m_uAttackType;
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace BrewMonster.PerfectWorld.Scripts.Vfx
|
||||
{
|
||||
[SerializeField] private ParticleSystem _vfx;
|
||||
[SerializeField] private float _lifeTime =-1;
|
||||
[SerializeField] private bool _isLoopVfx;
|
||||
private string _vfxPath;
|
||||
private Vector3 _originalScale = Vector3.one;
|
||||
private Vector3 _offset = Vector3.zero;
|
||||
@@ -49,6 +50,7 @@ namespace BrewMonster.PerfectWorld.Scripts.Vfx
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if(_isLoopVfx) return;
|
||||
if (_lifeTime > 0 && m_iState == GFX_STATE.ST_PLAY && !_lifetimeCompleted)
|
||||
{
|
||||
_elapsedTime += Time.deltaTime;
|
||||
|
||||
+134
-20
@@ -112,6 +112,7 @@ public partial class CECHostPlayer : CECPlayer
|
||||
Camera mainCam;
|
||||
|
||||
private BaseVfxObject m_pSelectedGFX;
|
||||
private BaseVfxObject m_pHoverGFX;
|
||||
|
||||
public bool IsChangingFace() { return m_bChangingFace; }
|
||||
|
||||
@@ -1128,7 +1129,7 @@ public partial class CECHostPlayer : CECPlayer
|
||||
var gfxCaster = EC_Game.GetGFXCaster();
|
||||
// m_pMoveTargetGFX = g_pGame->GetGFXCaster()->LoadGFXEx(res_GFXFile(RES_GFX_MOVETARGET));
|
||||
m_pSelectedGFX = await gfxCaster.LoadGFXEx(EC_Resource.res_GFXFile((int)GfxResourceType.RES_GFX_SELECTED));
|
||||
// m_pHoverGFX = g_pGame->GetGFXCaster()->LoadGFXEx(res_GFXFile(RES_GFX_CURSORHOVER));
|
||||
m_pHoverGFX = await gfxCaster.LoadGFXEx(EC_Resource.res_GFXFile((int)GfxResourceType.RES_GFX_CURSORHOVER));
|
||||
// m_pFloatDust = g_pGame->GetGFXCaster()->LoadGFXEx(res_GFXFile(RES_GFX_FLOATING_DUST));
|
||||
|
||||
if (true /*CECUIConfig::Instance().GetGameUI().bEnableActionSwitch*/)
|
||||
@@ -2327,30 +2328,31 @@ public partial class CECHostPlayer : CECPlayer
|
||||
// if (m_pLevelUpGFX)
|
||||
// m_pLevelUpGFX->SetParentTM(GetAbsoluteTM());
|
||||
|
||||
// if (m_pHoverGFX)// && m_idCurHover != m_idSelTarget)
|
||||
// {
|
||||
// if (!IsChangingFace() && (ISPLAYERID(m_idCurHover) || ISNPCID(m_idCurHover)))
|
||||
// {
|
||||
// CECObject* pObject = pWorld->GetObject(m_idCurHover, 1);
|
||||
// if (pObject)
|
||||
// {
|
||||
// if (m_pHoverGFX->GetState() == ST_STOP)
|
||||
// m_pHoverGFX->Start();
|
||||
//
|
||||
// m_pHoverGFX->SetParentTM(pObject->GetAbsoluteTM());
|
||||
// }
|
||||
// else
|
||||
// m_pHoverGFX->Stop();
|
||||
// }
|
||||
// else
|
||||
// m_pHoverGFX->Stop();
|
||||
// }
|
||||
if (m_pHoverGFX)// && m_idCurHover != m_idSelTarget)
|
||||
{
|
||||
if (!IsChangingFace() && (GPDataTypeHelper.ISPLAYERID(m_idCurHover) || GPDataTypeHelper.ISNPCID(m_idCurHover)))
|
||||
{
|
||||
CECObject pObject = EC_ManMessageMono.Instance?.GetObject(m_idCurHover, 1);
|
||||
if (pObject)
|
||||
{
|
||||
if (m_pHoverGFX.GetState() == GFX_STATE.ST_STOP)
|
||||
m_pHoverGFX.Play();
|
||||
|
||||
m_pSelectedGFX.transform.parent = pObject.transform;
|
||||
m_pSelectedGFX.transform.localPosition = Vector3.zero;
|
||||
}
|
||||
else
|
||||
m_pHoverGFX.Stop();
|
||||
}
|
||||
else
|
||||
m_pHoverGFX.Stop();
|
||||
}
|
||||
|
||||
if (m_pSelectedGFX)
|
||||
{
|
||||
if (!IsChangingFace() && (GPDataTypeHelper.ISPLAYERID(m_idSelTarget) || GPDataTypeHelper.ISNPCID(m_idSelTarget)))
|
||||
{
|
||||
var pObject =EC_ManMessageMono.Instance?.GetObject(m_idSelTarget, 1);
|
||||
var pObject = EC_ManMessageMono.Instance?.GetObject(m_idSelTarget, 1);
|
||||
if (pObject)
|
||||
{
|
||||
if (m_pSelectedGFX.GetState() == GFX_STATE.ST_STOP)
|
||||
@@ -2434,6 +2436,118 @@ public partial class CECHostPlayer : CECPlayer
|
||||
// ((CDlgOnlineAward*)pGameUI->GetDialog("Win_AddExp2"))->RestartWhenLevelup();
|
||||
// }
|
||||
}
|
||||
|
||||
// Estimate mouse cursor
|
||||
private void EstimateCursor() // here
|
||||
{
|
||||
// CECGameRun pGameRun = CECGameRun.Instance;
|
||||
//
|
||||
// m_idCurHover = 0;
|
||||
// if (pGameRun.UIHasCursor() || IsChangingFace())
|
||||
// return;
|
||||
//
|
||||
// CECCDS pCDS = pGameRun->GetWorld()->GetCDS();
|
||||
// CECInputCtrl* pInputCtrl = pGameRun->GetInputCtrl();
|
||||
//
|
||||
// int x, y, iCursor=RES_CUR_NORMAL;
|
||||
//
|
||||
// if (CDlgAutoHelp::IsAutoHelp())
|
||||
// {
|
||||
// iCursor = RES_CUR_HAND;
|
||||
// }
|
||||
//
|
||||
// pInputCtrl->GetMousePos(&x, &y);
|
||||
// A3DVECTOR3 vDest((float)x, (float)y, 1.0f);
|
||||
// A3DViewport* pView = g_pGame->GetViewport()->GetA3DViewport();
|
||||
// pView->InvTransform(vDest, vDest);
|
||||
//
|
||||
// A3DVECTOR3 vStart = pView->GetCamera()->GetPos();
|
||||
// A3DVECTOR3 vDelta = vDest - vStart;
|
||||
//
|
||||
// RAYTRACERT TraceRt;
|
||||
// int iTraceFlag = TRACEOBJ_LBTNCLICK;
|
||||
// if (pInputCtrl->KeyIsBeingPressed(VK_SHIFT))
|
||||
// iTraceFlag |= 0x80000000;
|
||||
//
|
||||
// if (pInputCtrl->KeyIsBeingPressed(VK_MENU))
|
||||
// iTraceFlag |= 0x40000000;
|
||||
//
|
||||
//
|
||||
//
|
||||
// CECPlayerMan* pPlayerMan = g_pGame->GetGameRun()->GetWorld()->GetPlayerMan();
|
||||
// CECElsePlayer* pPatePlayer = pPlayerMan->GetMouseOnPateTextPlayer(x,y);
|
||||
// if (pPatePlayer && pPatePlayer->GetBoothState() == 2){
|
||||
// iCursor = RES_CUR_HAND;
|
||||
// m_idCurHover = pPatePlayer->GetCharacterID();
|
||||
// }
|
||||
//
|
||||
// if (pCDS->RayTrace(vStart, vDelta, 1.0f, &TraceRt, iTraceFlag, (DWORD)this))
|
||||
// {
|
||||
// int idHitObject(0);
|
||||
// A3DVECTOR3 hitDis = TraceRt.vHitPos - vStart;
|
||||
// if(pPatePlayer){
|
||||
// A3DVECTOR3 playerPateDis = pPatePlayer->GetPos() - vStart;
|
||||
// if (hitDis.Magnitude() < playerPateDis.Magnitude()){
|
||||
// idHitObject = pCDS->m_RayTraceRt.iObjectID;
|
||||
// }
|
||||
// }else{
|
||||
// idHitObject = pCDS->m_RayTraceRt.iObjectID;
|
||||
// }
|
||||
// if (idHitObject){
|
||||
// bool bForceAttack = glb_GetForceAttackFlag(NULL);
|
||||
//
|
||||
// if (pCDS->m_RayTraceRt.iEntity == ECENT_MATTER)
|
||||
// {
|
||||
// CECMatter* pMatter = pGameRun->GetWorld()->GetMatterMan()->GetMatter(idHitObject);
|
||||
// if (pMatter)
|
||||
// {
|
||||
// if (!pMatter->IsMine())
|
||||
// iCursor = RES_CUR_PICKUP;
|
||||
// else if (CanGatherMatter(pMatter))
|
||||
// iCursor = pMatter->IsMonsterSpiritMine() ? RES_CUR_SWALLOW : RES_CUR_DIG;
|
||||
// }
|
||||
//
|
||||
// if (iCursor != RES_CUR_NORMAL)
|
||||
// m_idCurHover = idHitObject;
|
||||
// }
|
||||
// else if (pCDS->m_RayTraceRt.iEntity == ECENT_NPC)
|
||||
// {
|
||||
// CECNPC* pNPC = pGameRun->GetWorld()->GetNPCMan()->GetNPC(idHitObject);
|
||||
// if (pNPC)
|
||||
// {
|
||||
// m_idCurHover = idHitObject;
|
||||
// if (m_idSelTarget == idHitObject && AttackableJudge(idHitObject, bForceAttack) == 1)
|
||||
// iCursor = RES_CUR_ATTACK;
|
||||
// else if (pNPC->IsServerNPC())
|
||||
// {
|
||||
// if (!IsInBattle() || InSameBattleCamp(pNPC))
|
||||
// iCursor = RES_CUR_TALK;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else if (pCDS->m_RayTraceRt.iEntity == ECENT_PLAYER)
|
||||
// {
|
||||
// CECElsePlayer* pTracePlayer = pGameRun->GetWorld()->GetPlayerMan()->GetElsePlayer(idHitObject);
|
||||
// m_idCurHover = idHitObject;
|
||||
// if (m_idSelTarget == idHitObject && AttackableJudge(idHitObject, bForceAttack) == 1)
|
||||
// iCursor = RES_CUR_ATTACK;
|
||||
// }
|
||||
//
|
||||
// l_fTestDist = vDelta.Magnitude() * TraceRt.fFraction;
|
||||
// }
|
||||
// }else{
|
||||
// l_fTestDist = -1.0f;
|
||||
// }
|
||||
//
|
||||
// CECNPCMan* pNPCMan = g_pGame->GetGameRun()->GetWorld()->GetNPCMan();
|
||||
// CECNPC* pHoverNPC = pNPCMan->GetMouseOnPateTextNPC(x,y);
|
||||
// if (pHoverNPC){
|
||||
// iCursor = RES_CUR_TALK;
|
||||
// m_idCurHover = pHoverNPC->GetNPCID();
|
||||
// }
|
||||
//
|
||||
// g_pGame->ChangeCursor(iCursor);
|
||||
}
|
||||
}
|
||||
|
||||
public enum StateAnim
|
||||
|
||||
Reference in New Issue
Block a user