public void PopController(CameraControllerBase cameraController) { if (_cameraControllers.Remove(cameraController)) { EnsureCameraStack(); } }
public override void SetRoleObj(Units role, bool moveCameraImmediately = false) { CameraControllerBase cameraController = this.BattleCameraMgr.GetCameraController(CameraControllerType.Follow); cameraController.SetRoleObj(role, moveCameraImmediately); this.BattleCameraMgr.ChangeCameraController(CameraControllerType.Follow); }
public ScreensPositionBox() : base(new Rectangle(125, 825, 200, 50)) { Camera = null; Visible = true; }
public void ChangeCameraController(Camera targetCamera, CameraControllerBase newController) { CameraControllerBase oldController; if (!CameraControllerDict.ContainsKey(targetCamera)) { oldController = null; } else { oldController = CameraControllerDict [targetCamera]; } targetCamera.transform.parent = null; if (oldController != null) { oldController.gameObject.SetActiveRecursively(false); } if (newController != null) { newController.target = targetCamera; newController.gameObject.SetActiveRecursively(true); Debug.Log("Change to new cam controller " + newController.gameObject.name); } else { Debug.Log("Camera controller is null now."); } CameraControllerDict [targetCamera] = newController; }
// Start is called before the first frame update void Start() { _state = PlayerState.normalState; _weaponSystems = new GunScriptBase(this); _playerMover = new PlayerMoveBase(this); _cameraController = new CameraControllerBase(this); }
public AdditiveLayerParticleEffectManager(CameraControllerBase cameraController) : base(Render_Layer, cameraController) { _attackHitColours = new List <Color>() { Color.LawnGreen, Color.Green, Color.LightGreen }; }
public MouseWorldPositionBox() : base(new Rectangle(1375, 825, 200, 50)) { Input = null; Camera = null; Visible = true; }
public override void OnDoubleTap(TapGesture gesture) { CameraControllerBase controller = GetControllerByInputPos(gesture.Position); if (controller) { controller.OnDoubleTap(gesture); } }
public override void OnDrag(DragGesture gesture) { CameraControllerBase controller = GetControllerByInputPos(gesture.LastPos); if (controller) { controller.OnDrag(gesture); } }
public override void OnPinch(PinchGesture gesture) { CameraControllerBase controller = GetControllerByInputPos(gesture.Position); if (controller) { controller.OnPinch(gesture); } }
public void PushController(CameraControllerBase cameraController) { if (_cameraControllers.Contains(cameraController)) { return; } _cameraControllers.Add(cameraController); EnsureCameraStack(); }
public override void OnSimpleFingerUp(object v) { Vector3 v3 = (Vector3)v; CameraControllerBase controller = GetControllerByInputPos(v3); if (controller) { controller.OnSimpleFingerUp(v); } }
public override void OnSimpleFingerDown(object v) { Vector3 v3 = (Vector3)v; _CurrentController = GetControllerByInputPos(v3); if (_CurrentController) { _CurrentController.OnSimpleFingerDown(v); } }
public void SetController(CameraControllerBase controller) { _CurrentController = controller; if (_CurrentController) { transform.parent = _CurrentController.transform; transform.localPosition = Vector3.zero; transform.localRotation = Quaternion.identity; } UpdateFOV(); }
private void EnsureCameraStack() { if (_cameraControllers.Count > 0) { CameraControllerBase activeController = _cameraControllers[_cameraControllers.Count - 1]; activeController.enabled = true; _camera.transform.SetParent(activeController.MountPoint, true); } else { _camera.transform.SetParent(null, true); } }
public RenderController(bool useDefaultLayerStructure) { _layers = new List <RenderLayer>(); _cameraIndependentObjects = new List <IGameObject>(); _cameraController = null; _useCameraController = false; _someObjectsAreNotCameraLinked = false; _layerCount = -1; if (useDefaultLayerStructure) { CreateDefaultLayerStructure(); } }
private void InitCameraController() { if (this._controllers.Count != 0) { this._controllers.Clear(); this._curCameraController = null; this._currenCameraControllerType = CameraControllerType.None; } this._controllers.Add(CameraControllerType.None, null); this._controllers.Add(CameraControllerType.Free, new CameraControllerFree(this, this._cameraRootTransform, this._camera)); this._controllers.Add(CameraControllerType.Follow, new CameraControllerFollow(this, this._cameraRootTransform, this._camera)); this._controllers.Add(CameraControllerType.Center, new CameraControllerCenter(this, this._cameraRootTransform, this._camera)); this._controllers.Add(CameraControllerType.MoveByTap, new CameraControllerMoveByMapTap(this, this._cameraRootTransform, this._camera)); this._controllers.Add(CameraControllerType.AlwaysFree, new CameraControllerAlwaysFree(this, this._cameraRootTransform, this._camera)); }
/// <summary>Creates service definition that can be registered with a server</summary> /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> public static grpc::ServerServiceDefinition BindService(CameraControllerBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_GetInfo, serviceImpl.GetInfo) .AddMethod(__Method_IsConnected, serviceImpl.IsConnected) .AddMethod(__Method_RequestComList, serviceImpl.RequestComList) .AddMethod(__Method_RequestConnectToPort, serviceImpl.RequestConnectToPort) .AddMethod(__Method_RequestPowerStatus, serviceImpl.RequestPowerStatus) .AddMethod(__Method_RequestCurrentStatus, serviceImpl.RequestCurrentStatus) .AddMethod(__Method_RequestFocusStatus, serviceImpl.RequestFocusStatus) .AddMethod(__Method_RequestLaserStatus, serviceImpl.RequestLaserStatus) .AddMethod(__Method_RequestArmTrigger, serviceImpl.RequestArmTrigger) .AddMethod(__Method_RequestSoftwareReset, serviceImpl.RequestSoftwareReset) .AddMethod(__Method_StreamRequestArmTrigger, serviceImpl.StreamRequestArmTrigger).Build()); }
public OpaqueLayerParticleEffectManager(CameraControllerBase cameraController) : base(Render_Layer, cameraController) { _checkpointEffectColours = new List <Color>() { Color.Red, Color.Yellow, Color.LightGreen, Color.LightBlue, Color.Orange, Color.Pink }; _attackPowerUpColours = new List <Color>() { Color.Red, Color.Crimson, Color.DarkRed }; _defencePowerUpColours = new List <Color>() { Color.LawnGreen, Color.Green, Color.LightGreen }; }
public void DoRestoreCameraController() { if (this._currenCameraControllerType == this._lastCameraControllerType) { return; } if (this._curCameraController != null) { this._curCameraController.OnExit(); } if (this._lastCameraControllerType != CameraControllerType.None && this._lastCameraControllerType != CameraControllerType.MoveByTap) { this._currenCameraControllerType = this._lastCameraControllerType; } this._curCameraController = this._controllers[this._currenCameraControllerType]; this._curCameraController.OnEnter(); }
void SwitchCamera(CameraControllerBase basecam) { _CurrentControlCamera = basecam; if (_CurrentControlCamera == _NavController) { } else if (_CurrentControlCamera == _PlaneCameraController) { foreach (ScreenMeshHalfInCameraController smic in _MeshHalfInControllerArr) { smic.gameObject.GetComponentsInChildren <GVProjector>(true)[0].gameObject.SetActive(false); } _NavController.SetControlledCamera(null); _FrameNav.gameObject.SetActive(false); _FramesFull[0].gameObject.SetActive(false); _FramesFull[1].gameObject.SetActive(false); _FramePlane.gameObject.SetActive(true); } else { ScreenMeshHalfInCameraController smc = _CurrentControlCamera as ScreenMeshHalfInCameraController; _NavController.SetControlledCamera(smc); int i = 0; foreach (ScreenMeshHalfInCameraController smic in _MeshHalfInControllerArr) { if (smic == smc) { smic.gameObject.GetComponentsInChildren <GVProjector>(true)[0].gameObject.SetActive(true); } else { smic.gameObject.GetComponentsInChildren <GVProjector>(true)[0].gameObject.SetActive(false); } _FramesFull[i].gameObject.SetActive(smic == smc); i++; } _FrameNav.gameObject.SetActive(false); _FramePlane.gameObject.SetActive(false); } }
public override void OnSimpleFingerDown(object v) { Vector3 v3 = (Vector3)v; _CurrentControlCamera = GetControllerByInputPos(v3); if (_CurrentControlCamera) { if (_CurrentControlCamera == _PlaneCameraController) { _PlaneMeshController.OnSimpleFingerDown(v); } else { _CurrentControlCamera.OnSimpleFingerDown(v); } SwitchCamera(_CurrentControlCamera); } }
public void ChangeCameraController(CameraControllerType cameraControllerType) { if (GameManager.Instance.ReplayController.IsReplayStart) { cameraControllerType = CameraControllerType.Center; } if (cameraControllerType != this._currenCameraControllerType) { if (this._curCameraController != null) { this._curCameraController.OnExit(); } Units player = PlayerControlMgr.Instance.GetPlayer(); if (this._currenCameraControllerType != CameraControllerType.MoveByTap) { this._lastCameraControllerType = this._currenCameraControllerType; } if (this._cameraControllerTypeBeforeDeath == CameraControllerType.None) { this._cameraControllerTypeBeforeDeath = this._currenCameraControllerType; } this._currenCameraControllerType = cameraControllerType; this._curCameraController = this._controllers[this._currenCameraControllerType]; this._curCameraController.OnEnter(); if (Singleton <GoldView> .Instance.gameObject) { Singleton <GoldView> .Instance.SetLockViewIcon(cameraControllerType); } if (Singleton <HUDModuleManager> .Instance.gameObject) { FunctionBtnsModule module = Singleton <HUDModuleManager> .Instance.GetModule <FunctionBtnsModule>(EHUDModule.FunctionBtns); if (module != null) { module.SetLockViewIcon(cameraControllerType); } if (player != null && player.isLive) { this._cameraControllerTypeBeforeDeath = this._currenCameraControllerType; } } } }
public void Init() { _cameraController = new CameraFixedView(); }
public ParticleEffectManager(int renderLayer, CameraControllerBase cameraController) : base() { RenderLayer = renderLayer; CameraController = cameraController; }
public void SwitchController(CameraControllerBase cameraController) { PopCurrentController(); PushController(cameraController); }
public void ClipOffCameraRendering(CameraControllerBase cameraController, int margin) { _cameraController = cameraController; _cameraController.RenderClippingMargin = margin; _useCameraController = true; }