public override bool Execute(object sender, SkillInstance instance, long delta, long curSectionTime) { if (curSectionTime < m_StartTime) { return(true); } GameObject obj = sender as GameObject; if (obj == null) { return(false); } if (!TriggerUtil.IsPlayerSelf(obj)) { return(false); } GameObject camera_obj = TriggerUtil.GetCameraObj(); if (camera_obj != null) { string str_param = "" + m_MaxDistance + "|" + m_MinDistance + "|" + m_MaxSpeed + "|" + m_MinSpeed + "|" + m_Power; camera_obj.SendMessage("SetFollowSpeedByStr", str_param); } return(false); }
private bool Init(SkillInstance instance) { if (m_IsNeedCollide) { SkillDamageManager damage_manager = instance.CustomDatas.GetData <SkillDamageManager>(); if (damage_manager == null || !damage_manager.IsDamagedEnemy) { return(false); } } if (m_XShakeInfo == null || m_YShakeInfo == null || m_ZShakeInfo == null) { return(false); } m_IsInited = true; m_CameraOriginPos = Camera.main.transform.position; m_LastCameraFollowPos = m_CameraOriginPos; m_CameraControlId = TriggerUtil.ControlCamera(true); if (m_CameraControlId == TriggerUtil.CAMERA_CONTROL_FAILED) { return(false); } float now = instance.CurTime / 1000.0f; m_XShakeInfo.Init(m_CameraOriginPos.x, now); m_YShakeInfo.Init(m_CameraOriginPos.y, now); m_ZShakeInfo.Init(m_CameraOriginPos.z, now); m_CameraObject = TriggerUtil.GetCameraObj(); return(true); }
public override bool Execute(object sender, SkillInstance instance, long delta, long curSectionTime) { if (curSectionTime < m_StartTime) { return(true); } if (curSectionTime > (m_StartTime + m_RemainTime)) { ResetMainCameraAttr(); return(false); } GameObject obj = sender as GameObject; if (obj == null) { return(false); } if (!m_IsSeted) { m_IsSeted = true; m_MainCameraObj = TriggerUtil.GetCameraObj(); SetMainCameraAttr(m_Distance, m_Height); } return(true); }
private bool Init() { m_IsInited = true; m_CameraControlId = TriggerUtil.ControlCamera(true, true); if (m_CameraControlId < TriggerUtil.CAMERA_CONTROL_START_ID) { return(false); } m_CameraObj = TriggerUtil.GetCameraObj(); return(true); }
private bool Init(SkillInstance instance) { m_CameraControlId = TriggerUtil.ControlCamera(true, true); if (m_CameraControlId < TriggerUtil.CAMERA_CONTROL_START_ID) { return(false); } m_CameraObj = TriggerUtil.GetCameraObj(); CopySectionList(); m_Now = instance.CurTime / 1000.0f; m_SectionListCopy[0].startTime = m_Now; m_SectionListCopy[0].lastUpdateTime = m_Now; m_SectionListCopy[0].curSpeedVect = m_SectionListCopy[0].speedVect; m_IsInited = true; return(true); }
public override bool Execute(object sender, SkillInstance instance, long delta, long curSectionTime) { if (curSectionTime < m_StartTime) { return(true); } GameObject obj = sender as GameObject; if (obj == null) { return(false); } if (!TriggerUtil.IsPlayerSelf(obj)) { return(false); } GameObject camera_obj = TriggerUtil.GetCameraObj(); if (camera_obj != null) { camera_obj.SendMessage("ResetFollowSpeed"); } return(false); }