public static void ProcessPlayerHealthDamage(Contexts contexts, IPlayerDamager damager, PlayerEntity srcPlayer, PlayerEntity playerEntity, PlayerDamageInfo damage, IDamageInfoCollector damageInfoCollector) { if (null == damageInfoCollector) { _logger.Error("damageInfoCollector is null"); } DoProcessPlayerHealthDamage(contexts, damager, srcPlayer, playerEntity, damage, damageInfoCollector); }
public BulletHitHandler(Contexts contexts, IEntityIdGenerator entityIdGenerator, IPlayerDamager damager, IDamageInfoCollector damageInfoCollector, ISoundEntityFactory soundEntityFactory, IEnvironmentTypeConfigManager environmentTypeConfigManager) { _contexts = contexts; this._entityIdGenerator = entityIdGenerator; _damager = damager; _damageInfoCollector = damageInfoCollector; _soundEntityFactory = soundEntityFactory; _environmentTypeConfigManager = environmentTypeConfigManager; _sceneObjectEntityFactory = _contexts.session.entityFactoryObject.SceneObjectEntityFactory; _triggerObjectManager = SingletonManager.Get <TriggerObjectManager>(); }
public MeleeHitHandler( IPlayerDamager damager, ClientEffectContext context, IEntityIdGenerator idGenerator, IDamageInfoCollector damageInfoCollector, ISoundEntityFactory soundEntityFactory) { _damager = damager; _clientEffectContext = context; _entityIdGenerator = idGenerator; _damageInfoCollector = damageInfoCollector; _soundEntityFactory = soundEntityFactory; }
public static void OnEnvironmentHit(PlayerContext playerContext, IPlayerDamager damager, IDamageInfoCollector damageInfoCollector) { if (!_active) { return; } var player = playerContext.flagSelfEntity; BulletPlayerUtility.ProcessPlayerHealthDamage( damager, player, player, new PlayerDamageInfo(10, (int)EUIDeadType.Weapon, (int)EBodyPart.Chest, player.weaponLogicInfo.WeaponId), damageInfoCollector); }
public ServerRoom(IRoomId roomId, Contexts contexts, IRoomEventDispatchter eventDispatcher, ICoRoutineManager coRoutineManager, IUnityAssetManager assetManager, IPlayerTokenGenerator tokenGenerator) { //SingletonManager.Get<ServerFileSystemConfigManager>().Reload(); _state = RoomState.Initialized; _tokenGenerator = tokenGenerator; _coRoutineManager = coRoutineManager; var entityIdGenerator = new EntityIdGenerator(EntityIdGenerator.GlobalBaseId); var equipmentEntityIdGenerator = new EntityIdGenerator(EntityIdGenerator.EquipmentBaseId); var ruleId = RuleMap.GetRuleId(SingletonManager.Get <ServerFileSystemConfigManager>().BootConfig.Rule); RoomId = roomId; _contexts = contexts; #if (!ENTITAS_DISABLE_VISUAL_DEBUGGING && UNITY_EDITOR) _contexts.InitializeContexObservers(); #endif SingletonManager.Get <MyProfilerManager>().Contexts = _contexts; _eventDispatcher = eventDispatcher; _bin2DManager = CreateBin2DManager(); IniCurrentTimeSession(); InitEntityFactorySession(entityIdGenerator, equipmentEntityIdGenerator); _assetManager = assetManager; InitCommonSession(entityIdGenerator, equipmentEntityIdGenerator, ruleId); InitServerSession(_bin2DManager, ruleId); _contexts.vehicle.SetSimulationTime(0); MessageDispatcher = CreateNetworMessageHandlers(); _snapshotFactory = new SnapshotFactory(_contexts.session.commonSession.GameContexts); _sessionStateMachine = new ServerSessionStateMachine(_contexts, this); _damager = new SimplePlayerDamager(this); VehicleDamageUtility._damager = _damager; _sendSnapshotManager = new SendSnapshotManager(_contexts); InitialWeaponSkill(); }
public ServerRoom(RoomId id, ContextsServerWrapper contextsServerWrapper, RoomEventDispatcher dispatcher, IPlayerTokenGenerator playerTokenGenerator) { state = RoomState.Initialized; isDisposed = false; RoomId = id; ContextsWrapper = contextsServerWrapper; MessageDispatcher = CreateNetworMessageHandlers(); tokenGenerator = playerTokenGenerator; eventDispatcher = dispatcher; snapshotFactory = new SnapshotFactory(ContextsWrapper.GameContexts); sessionStateMachine = new ServerSessionStateMachine(ContextsWrapper.contexts, this); damager = new SimplePlayerDamager(this); compensationManager = new CompensationManager(); VehicleDamageUtility._damager = damager; sendSnapshotManager = new SendSnapshotManager(ContextsWrapper.contexts); }
public HitHumanHandler(IPlayerDamager damager, Contexts contexts) : base(contexts) { this.damager = damager; profilerInfo = SingletonManager.Get <DurationHelp>().GetCustomProfileInfo("BulletHitHandler_OnHitPlayer"); }
public static void DoProcessPlayerHealthDamage(Contexts contexts, IPlayerDamager damager, PlayerEntity srcPlayer, PlayerEntity playerEntity, PlayerDamageInfo damage, IDamageInfoCollector damageInfoCollector) { IGameRule gameRule = null != damager ? damager.GameRule : null; DoProcessPlayerHealthDamage(contexts, gameRule, srcPlayer, playerEntity, damage, damageInfoCollector); }
public static void ProcessPlayerHealthDamage(Contexts contexts, IPlayerDamager damager, PlayerEntity srcPlayer, PlayerEntity playerEntity, PlayerDamageInfo damage) { DoProcessPlayerHealthDamage(contexts, damager, srcPlayer, playerEntity, damage, null); }
public ThrowingHitHandler(Contexts contexts, IPlayerDamager damager) { _damager = damager; _contexts = contexts; }
public BulletHitHandler(Contexts contexts, IEntityIdGenerator entityIdGenerator, IPlayerDamager damager) { AbstractHitHandler handler = new HitHumanHandler(damager, contexts); hitTargetHandlers.Add(handler); handler = new HitVehicleHandler(contexts); hitTargetHandlers.Add(handler); handler = new HitEnvironmentHandler(contexts); hitTargetHandlers.Add(handler); playerContext = contexts.player; }
public ThrowingHitHandler(IPlayerDamager damager) { _damager = damager; }
public MeleeHitHandler(IPlayerDamager damager) { _damager = damager; }