public override void OnEnter() { base.OnEnter(); CameraMgr.Place(cameraPosition); CameraMgr.Euler(cameraRotation); Debug.Log(skybox); if (null != skybox) { CameraMgr.ApplySkybox(skybox); } ResourceMgr.ToggleGameObjects(objs.ToArray(), true); foreach (string cloneUUID in triggers) { TriggerMgr.ToggleTrigger(cloneUUID, true); } }
public static void Execute(Dictionary <string, string> _params, ActionDelegate _onFinish) { string x = ""; if (!_params.TryGetValue("x", out x)) { Log.Error("Place", "need params x"); return; } string y = ""; if (!_params.TryGetValue("y", out y)) { Log.Error("Place", "need params y"); return; } string z = ""; if (!_params.TryGetValue("z", out z)) { Log.Error("Place", "need params z"); return; } float _x = float.Parse(x); float _y = float.Parse(y); float _z = float.Parse(z); try { CameraMgr.Place(new Vector3(_x, _y, _z)); _onFinish(); } catch (System.Exception e) { Log.Error("setCameraPosition", "Parse json has error: " + e.Message); } }