private void OnTrigger() { //try get target var param = m_ActionPlayer.GetActionParam(); if (null != param && null != param.Object && param.Object is FuncContext) { FuncContext context = param.Object as FuncContext; Ilife userInstance = context.Get(FuncContext.ContextKey.Target) as Ilife; if (null == userInstance) { return; } m_TargetObj = ((CharTransformData)(((ITransformBehaviour)(userInstance)).GetTransformData())).GetGameObject(); m_EffectObj = EffectContainer.GetInstance(uint.Parse(m_FrameConfig.InstanceId)); m_vTargetPos = m_TargetObj.transform.position; m_fLeftTime = (float)(m_FrameConfig.Time); m_fHigh = (float)(m_FrameConfig.High); m_fInitTime = TimeManager.Instance.GetTime(); m_fLastTime = m_fInitTime; m_fLastVx = Vector3.Distance(m_EffectObj.transform.position, m_vTargetPos) / m_fLeftTime; m_fLastVy = (float)(0.5f * 9.8 * m_fLeftTime); m_vInitPos = m_EffectObj.transform.position; m_vDir = m_vTargetPos - m_vInitPos; m_vDeltaSpace.Normalize(); m_bIsRunning = true; } }
private void OnTrigger() { GameObject objInstance = EffectContainer.GetInstance(uint.Parse(m_FrameConfig.InstanceId)); if (null != objInstance) { GameObject.Destroy(objInstance); } }
public override void Destory() { uint id = (uint)(m_FrameConfig.InstanceId); GameObject objInstance = EffectContainer.GetInstance(id); if (null != objInstance) { GameObject.Destroy(objInstance); } }