public void FadeInToGivenCamera(string paramName) { PA_Param param = FindParam(paramName); if (param == null) { return; } Camera cam = GetCameraFromParam(param, 0); if (cam != null) { FadeEffect fadeEffect = GetARequiredComponent <FadeEffect>(cam.gameObject); if (fadeEffect == null) { return; } Color curColor = fadeEffect.blendColor; Color destColor = Color.white; float duration = param.GetFloat(0); TweenColorInternal(fadeEffect, curColor, destColor, duration); } }
public void RandomDelayReplay(string paramName) { PA_Param param = FindParam(paramName); if (param == null) { return; } float min = param.GetFloat(0); float max = param.GetFloat(1); if (max <= min) { Replay(); } else { float v = Random.Range(min, max); Invoke("Replay", v); } }
public void CameraShake(string paramName) { PA_Param param = FindParam(paramName); if (param == null) { return; } GameObject center = param.GetGameObject(0); //float radius = param.GetFloat(0); bool shouldStart = false; if (center != null) { //if( CoreEntry.gTeamMgr.MainPlayer != null ) //{ // if( radius <= 0 ) // { // shouldStart = true; // } // else if ((CoreEntry.gTeamMgr.MainPlayer.transform.position - center.transform.position).magnitude <= radius) // { // shouldStart = true; // } //} } else { shouldStart = true; } if (shouldStart) { Camera cam = GetCameraFromParam(param, 1); if (cam != null) { float scale = param.GetFloat(1); if (scale <= 0f) { scale = 1f; } CameraEffect effect = GetARequiredComponent <CameraEffect>(cam.gameObject); if (effect != null) { effect.Scale = scale; effect.ShakeStart(); } } } }
public void TurnToBoss(string paramName) { PA_Param param = FindParam(paramName); if (param == null) { return; } GameObject obj = param.GetGameObject(0); if (obj != null) { GameObject tmpBoss = GetBoss(); Transform chestSocket = tmpBoss.GetComponent <ActorObj>().GetChildTransform("E_Spine"); float time = param.GetFloat(0); StartCoroutine(TuningToObject(obj, chestSocket, time)); } }