public void SetFieldMap(FieldMap fieldMap) { this.mbgCamera.depth = -4096f; this.currentFieldMap = fieldMap; MBG.MBGParms.oldBGCamNdx = this.currentFieldMap.GetCurrentCameraIndex(); Camera mainCamera = fieldMap.GetMainCamera(); this.SetMovieCamera(mainCamera); }
public static void World2Screen(Vector3 v, out Single x, out Single y) { FieldMap fieldmap = PersistenSingleton <EventEngine> .Instance.fieldmap; Camera mainCamera = fieldmap.GetMainCamera(); BGCAM_DEF currentBgCamera = fieldmap.GetCurrentBgCamera(); Vector3 vector = PSX.CalculateGTE_RTPT(v, Matrix4x4.identity, currentBgCamera.GetMatrixRT(), currentBgCamera.GetViewDistance(), fieldmap.GetProjectionOffset()); Vector2 cameraOffset = fieldmap.GetCameraOffset(); Single num = vector.x - cameraOffset.x; Single num2 = vector.y - cameraOffset.y; ETb.ConvertGTEToUIScreenPosition(ref num, ref num2); x = num; y = num2; }
public static void SetCenterPosition(Int32 type) { switch (type) { case 0: Obj objUid = PersistenSingleton <EventEngine> .Instance.GetObjUID(250); if (objUid != null && objUid.cid == 4) { PosObj posObj = (PosObj)objUid; FieldMap fieldMap = PersistenSingleton <EventEngine> .Instance.fieldmap; Camera mainCamera = fieldMap.GetMainCamera(); BGCAM_DEF currentBgCamera = fieldMap.GetCurrentBgCamera(); Vector3 position = PSXCalculateGTE_RTPT(new Vector3(posObj.pos[0], posObj.pos[1], posObj.pos[2]), Matrix4x4.identity, currentBgCamera.GetMatrixRT(), currentBgCamera.GetViewDistance(), fieldMap.GetProjectionOffset()); Vector3 vector3 = mainCamera.WorldToScreenPoint(position); vector3.x /= mainCamera.pixelWidth; vector3.y /= mainCamera.pixelHeight; _px = vector3.x; _py = vector3.y; //Debug.Log(string.Concat("px : ", _px, " , py : ", _py)); break; } _px = 0.5f; _py = 0.5f; break; case 1: if (ff9.w_moveActorPtr != null) { Vector3 pos = ff9.w_moveActorPtr.pos; Camera camera = ff9.w_frameCameraPtr; Vector3 vector3 = camera.WorldToScreenPoint(pos); vector3.x /= camera.pixelWidth; vector3.y /= camera.pixelHeight; _px = vector3.x; _py = vector3.y; //Debug.Log(string.Concat("px : ", _px, " , py : ", _py)); break; } _px = 0.5f; _py = 0.5f; break; default: _px = 0.5f; _py = 0.5f; break; } }
// Token: 0x060014D9 RID: 5337 RVA: 0x00150974 File Offset: 0x0014EB74 public static void SetCenterPosition(int type) { if (type != 0) { if (type != 1) { SFX_Rush.px = 0.5f; SFX_Rush.py = 0.5f; } else if (ff9.w_moveActorPtr != null) { Vector3 pos = ff9.w_moveActorPtr.pos; Camera w_frameCameraPtr = ff9.w_frameCameraPtr; Vector3 vector = w_frameCameraPtr.WorldToScreenPoint(pos); vector.x /= (float)w_frameCameraPtr.pixelWidth; vector.y /= (float)w_frameCameraPtr.pixelHeight; SFX_Rush.px = vector.x; SFX_Rush.py = vector.y; global::Debug.Log(string.Concat(new object[] { "px : ", SFX_Rush.px, " , py : ", SFX_Rush.py })); } else { SFX_Rush.px = 0.5f; SFX_Rush.py = 0.5f; } } else { Obj objUID = PersistenSingleton <EventEngine> .Instance.GetObjUID(250); if (objUID != null && objUID.cid == 4) { PosObj posObj = (PosObj)objUID; FieldMap fieldmap = PersistenSingleton <EventEngine> .Instance.fieldmap; Camera mainCamera = fieldmap.GetMainCamera(); BGCAM_DEF currentBgCamera = fieldmap.GetCurrentBgCamera(); Vector3 vertex = new Vector3(posObj.pos[0], posObj.pos[1], posObj.pos[2]); Vector3 position = PSX.CalculateGTE_RTPT(vertex, Matrix4x4.identity, currentBgCamera.GetMatrixRT(), currentBgCamera.GetViewDistance(), fieldmap.GetProjectionOffset()); position = mainCamera.WorldToScreenPoint(position); position.x /= (float)mainCamera.pixelWidth; position.y /= (float)mainCamera.pixelHeight; SFX_Rush.px = position.x; SFX_Rush.py = position.y; global::Debug.Log(string.Concat(new object[] { "px : ", SFX_Rush.px, " , py : ", SFX_Rush.py })); } else { SFX_Rush.px = 0.5f; SFX_Rush.py = 0.5f; } } }