public CameraPostUpdateSystem(PlayerContext playContext, VehicleContext vehicleContext, FreeMoveContext freeMoveContext) { _playerContext = playContext; _vehicleContext = vehicleContext; _freeMoveContext = freeMoveContext; _baseCollisionLayers = UnityLayers.SceneCollidableLayerMask; }
public CameraPreUpdateSystem(Contexts contexts, Motors m) { _vehicleContext = contexts.vehicle; _freeMoveContext = contexts.freeMove; _contexts = contexts; _motors = m; _state = new DummyCameraMotorState(m); }
public ClientCameraPreUpdateSystem(VehicleContext vehicleContext, FreeMoveContext freeMoveContext, PlayerContext playerContext, Motors m) { _vehicleContext = vehicleContext; _freeMoveContext = freeMoveContext; _motors = m; _playerContext = playerContext; _state = new DummyCameraMotorState(m); _subCameraMotorTypeArray = Enum.GetValues(typeof(SubCameraMotorType)); }
public CameraUpdateSystem(Contexts context, Motors m) { _context = context; _vehicleContext = context.vehicle; _freeMoveContext = context.freeMove; _playerContext = context.player; _motors = m; _state = new DummyCameraMotorState(_motors); _dummyState = new DummyCameraMotorState(_motors); }
public ClientCameraPreUpdateSystem(Contexts contexts, Motors m) { _vehicleContext = contexts.vehicle; _freeMoveContext = contexts.freeMove; _motors = m; _playerContext = contexts.player; _contexts = contexts; _state = new DummyCameraMotorState(m); _subCameraMotorTypeArray = Enum.GetValues(typeof(SubCameraMotorType)); }
public FreeObjectCastLogic( FreeMoveContext freeMoveContext, PlayerContext playerContext, IUserCmdGenerator cmdGenerator, float distance) : base(playerContext, distance) { _userCmdGenerator = cmdGenerator; _freeMoveContext = freeMoveContext; _playerContext = playerContext; }
public PickUpUiAdapter(PlayerContext player, SceneObjectContext sceneObject, MapObjectContext mapObject, SessionContext session, VehicleContext vehicle, FreeMoveContext freeMove, UserInputManager.Lib.UserInputManager userInputManager, UiContext uiContext) { this.player = player; this.sceneObject = sceneObject; this.mapObject = mapObject; this.session = session; this.vehicle = vehicle; this.freeMove = freeMove; this.userInputManager = userInputManager; this.uiContext = uiContext; }
public CameraPreUpdateSystem(VehicleContext vehicleContext, FreeMoveContext freeMoveContext, Motors m) { _vehicleContext = vehicleContext; _freeMoveContext = freeMoveContext; _motors = m; _state = new DummyCameraMotorState(m); foreach (SubCameraMotorType value in Enum.GetValues(typeof(SubCameraMotorType))) { _subCameraMotorTypeArray.Add(value); } }
public static FreeMoveEntity GetAirPlane(this PlayerEntity playerEntity, FreeMoveContext freeMoveContext) { foreach (var freeMoveEntity in freeMoveContext.GetEntities()) { if (freeMoveEntity.hasFreeData && freeMoveEntity.hasPosition && freeMoveEntity.freeData.Key.Equals("plane")) { return(freeMoveEntity); } } return(null); }
public CameraUpdateSystem(Contexts context, Motors m) { _context = context; _vehicleContext = context.vehicle; _freeMoveContext = context.freeMove; _playerContext = context.player; _motors = m; _state = new DummyCameraMotorState(_motors); foreach (SubCameraMotorType value in Enum.GetValues(typeof(SubCameraMotorType))) { _subCameraMotorTypeArray.Add(value); } }
public DrivePoseMotor(ECameraPoseMode modeId, HashSet <ECameraPoseMode> excludes, VehicleContext vehicleContext, FreeMoveContext freeMoveContext, Motors m ) : base(m) { _modeId = (short)modeId; _motors = m; this.excludes = new HashSet <short>(); foreach (var e in excludes) { this.excludes.Add((short)e); } _order = SingletonManager.Get <CameraConfigManager>().GetRoleConfig() .GetCameraConfigItem((ECameraPoseMode)_modeId).Order; _motors.ActionManager.AddAction(CameraActionType.Enter, SubCameraMotorType.Pose, (int)modeId, (player, state) => { if (player.IsOnVehicle()) { var vehicle = vehicleContext.GetEntityWithEntityKey(player.controlledVehicle.EntityKey); player.controlledVehicle.CameraAnchorOffset = vehicle.vehicleAssetInfo.CameraAnchorOffset; player.controlledVehicle.CameraDistance = vehicle.vehicleAssetInfo.CameraDistance; player.controlledVehicle.CameraRotationDamping = vehicle.vehicleAssetInfo.CameraRotationDamping; } var cameraEulerAngle = player.cameraFinalOutputNew.EulerAngle; var carEulerAngle = player.cameraArchor.ArchorEulerAngle; var t = cameraEulerAngle - carEulerAngle; state.FreeYaw = t.y; state.FreePitch = t.x; }); _motors.ActionManager.AddAction(CameraActionType.Leave, SubCameraMotorType.Pose, (int)modeId, (player, state) => { var rotation = player.cameraFinalOutputNew.EulerAngle; player.orientation.Yaw = YawPitchUtility.Normalize(rotation.y); player.orientation.Pitch = YawPitchUtility.Normalize(rotation.x); state.LastFreePitch = 0; state.LastFreeYaw = 0; state.FreeYaw = 0f; state.FreePitch = 0f; }); }
public CameraPostUpdateSystem(Contexts context) : base(context) { _playerContext = context.player; _freeMoveContext = context.freeMove; _baseCollisionLayers = UnityLayers.CameraCollidableLayerMask; _archoroffsetArm = new SpringArm(); _postOffsetArm = new SpringArm(); _offsetArm = new SpringArm(); _archoroffsetArm.Set(0.2f, 0.2f, 5, _baseCollisionLayers); _postOffsetArm.Set(0.12f, 0.5f, 5, _baseCollisionLayers); _offsetArm.Set(0.1f, 0.02f, 5, _baseCollisionLayers); }
public AirplanePoseMotor(ECameraPoseMode modeId, HashSet <ECameraPoseMode> excludes, VehicleContext vehicleContext, FreeMoveContext freeMoveContext, Motors m) : base(modeId, excludes, vehicleContext, freeMoveContext, m) { }
public CameraUpdateArchorSystem(Contexts _contexts) : base(_contexts) { _playerContext = _contexts.player; _freeMoveContext = _contexts.freeMove; }
public FreeMoveCleanupSystem(FreeMoveContext freeMoveContext) { _group = freeMoveContext.GetGroup(FreeMoveMatcher.AnyOf(FreeMoveMatcher.FlagDestroy)); }
public static Motors CraeteMotors(CameraConfig config, VehicleContext vehicle, FreeMoveContext freeMoveContext) { Motors motors = new Motors(); var pose = motors.GetDict(SubCameraMotorType.Pose); pose[(int)ECameraPoseMode.Stand] = new NormalPoseMotor(ECameraPoseMode.Stand, config.GerCameraConfigItem(ECameraConfigType.ThirdPerson), new HashSet <ECameraPoseMode>(CommonEnumEqualityComparer <ECameraPoseMode> .Instance), new ThirdPersonActice()); pose[(int)ECameraPoseMode.Crouch] = new NormalPoseMotor(ECameraPoseMode.Crouch, config.GerCameraConfigItem(ECameraConfigType.Crouch), new HashSet <ECameraPoseMode>(CommonEnumEqualityComparer <ECameraPoseMode> .Instance), new CrouchActice()); pose[(int)ECameraPoseMode.Prone] = new NormalPoseMotor(ECameraPoseMode.Prone, config.GerCameraConfigItem(ECameraConfigType.Prone), new HashSet <ECameraPoseMode>(CommonEnumEqualityComparer <ECameraPoseMode> .Instance), new ProneActice()); pose[(int)ECameraPoseMode.Swim] = new NormalPoseMotor(ECameraPoseMode.Swim, config.GerCameraConfigItem(ECameraConfigType.Swim), new HashSet <ECameraPoseMode>(CommonEnumEqualityComparer <ECameraPoseMode> .Instance), new SwimActice()); pose[(int)ECameraPoseMode.Dying] = new NormalPoseMotor(ECameraPoseMode.Dying, config.GerCameraConfigItem(ECameraConfigType.Dying), new HashSet <ECameraPoseMode>(CommonEnumEqualityComparer <ECameraPoseMode> .Instance), new DyingActice()); pose[(int)ECameraPoseMode.Dead] = new DeadPoseMotor(ECameraPoseMode.Dead, config.GerCameraConfigItem(ECameraConfigType.Dead), new HashSet <ECameraPoseMode>(CommonEnumEqualityComparer <ECameraPoseMode> .Instance), new DeadActice(), config.DeadConfig); pose[(int)ECameraPoseMode.Parachuting] = new NormalPoseMotor(ECameraPoseMode.Parachuting, config.GerCameraConfigItem(ECameraConfigType.Parachuting), new HashSet <ECameraPoseMode>(CommonEnumEqualityComparer <ECameraPoseMode> .Instance), new ParachutingActice(), 400); pose[(int)ECameraPoseMode.ParachutingOpen] = new NormalPoseMotor(ECameraPoseMode.ParachutingOpen, config.GerCameraConfigItem(ECameraConfigType.ParachutingOpen), new HashSet <ECameraPoseMode>(CommonEnumEqualityComparer <ECameraPoseMode> .Instance), new ParachutingOpenActice(), 300); pose[(int)ECameraPoseMode.Gliding] = new GlidingPoseMotor(ECameraPoseMode.Gliding, config.GerCameraConfigItem(ECameraConfigType.Gliding), new HashSet <ECameraPoseMode>(CommonEnumEqualityComparer <ECameraPoseMode> .Instance), new GlidingActice()); pose[(int)ECameraPoseMode.DriveCar] = new DrivePoseMotor(ECameraPoseMode.DriveCar, config.GerCameraConfigItem(ECameraConfigType.DriveCar), new HashSet <ECameraPoseMode>(CommonEnumEqualityComparer <ECameraPoseMode> .Instance), vehicle, freeMoveContext); pose[(int)ECameraPoseMode.AirPlane] = new AirplanePoseMotor(ECameraPoseMode.AirPlane, config.GerCameraConfigItem(ECameraConfigType.AirPlane), new HashSet <ECameraPoseMode>(CommonEnumEqualityComparer <ECameraPoseMode> .Instance), vehicle, freeMoveContext); pose[(int)ECameraPoseMode.Rescue] = new NormalPoseMotor(ECameraPoseMode.Rescue, config.GerCameraConfigItem(ECameraConfigType.Rescue), new HashSet <ECameraPoseMode>(CommonEnumEqualityComparer <ECameraPoseMode> .Instance), new RescueActive()); var free = motors.GetDict(SubCameraMotorType.Free); free[(int)ECameraFreeMode.On] = new FreeOnMotor(); free[(int)ECameraFreeMode.Off] = new FreeOffMotor(config.FreeConfig.TransitionTime); var peek = motors.GetDict(SubCameraMotorType.Peek); peek[(int)ECameraPeekMode.Off] = new PeekOffMotor(config.PeekConfig.TransitionTime); peek[(int)ECameraPeekMode.Left] = new PeekOnMotor(false, config.PeekConfig); peek[(int)ECameraPeekMode.Right] = new PeekOnMotor(true, config.PeekConfig); var view = motors.GetDict(SubCameraMotorType.View); view[(int)ECameraViewMode.FirstPerson] = new FirstViewMotor(); view[(int)ECameraViewMode.GunSight] = new GunSightMotor(); view[(int)ECameraViewMode.ThirdPerson] = new ThirdViewMotor(); CameraActionManager.AddAction(CameraActionType.Enter, SubCameraMotorType.Pose, (int)ECameraConfigType.Parachuting, (player, state) => { var cameraEulerAngle = player.cameraFinalOutputNew.EulerAngle; var carEulerAngle = player.cameraArchor.ArchorEulerAngle; var t = cameraEulerAngle - carEulerAngle; state.FreeYaw = t.y; state.FreePitch = t.x; }); return(motors); }
public AirplanePoseMotor(ECameraPoseMode modeId, CameraConfigItem config, HashSet <ECameraPoseMode> excludes, VehicleContext vehicleContext, FreeMoveContext freeMoveContext) : base(modeId, config, excludes, vehicleContext, freeMoveContext) { }
public FreeMoveAddSystem(FreeMoveContext sceneObjectContext) : base(sceneObjectContext) { }
public FreeObjectCastLogic(FreeMoveContext freeMoveContext, PlayerContext playerContext, UserInputManager.Lib.UserInputManager userInputManager, float distance) : base(playerContext, distance) { _freeMoveContext = freeMoveContext; _playerContext = playerContext; _userInputManager = userInputManager; }
public FreeMoveGameContext(FreeMoveContext context, Bin2D <IGameEntity> bin) : base(context, FreeMoveComponentsLookup.componentTypes, bin) { _context = context; }
public FreeObjectCleanUpSystem(FreeMoveContext context) { _group = context.GetGroup(FreeMoveMatcher.AllOf(FreeMoveMatcher.FlagDestroy)); }
public FreeObjectLoadSystem(FreeMoveContext freeMove) : base(freeMove) { }
public AirPlaneInitSystem(FreeMoveContext freeMoveContext) : base(freeMoveContext) { //_freeMovegroup = freeMoveContext.GetGroup(FreeMoveMatcher.FreeData); }