public void AddShootPlayer(int cmdSeq, IBulletEntityAgent bulletEntityAgent, PrecisionsVector3 hitPoint, EntityKey targetKey, PrecisionsVector3 positionValue, EBodyPart part, float totalDamage) { StatisticsHitPlayerEvent hitPlayerEvent = (StatisticsHitPlayerEvent)EventInfos.Instance.Allocate(EEventType.HitPlayerStastics, false); hitPlayerEvent.cmdSeq = cmdSeq; // hitPlayerEvent.bulletRuntimeText = bulletEntityAgent.ToDynamicString(); // hitPlayerEvent.bulletBaseText = bulletEntityAgent.ToBaseDataString(); hitPlayerEvent.bodyPart = part; hitPlayerEvent.totalDamage = totalDamage; hitPlayerEvent.posValue = positionValue; hitPlayerEvent.hitPoint = hitPoint; hitPlayerEvent.serverTime = bulletEntityAgent.ServerTime; hitPlayerEvent.statisticStr = bulletEntityAgent.StatisticsInfo.ToString(); hitPlayerEvent.shootKey = string.Format("{0}_{1}_to_{2}", cmdSeq, bulletEntityAgent.OwnerEntityKey, targetKey); hitPlayerEvent.shootTarget = targetKey; // srcPlayer.localEvents.Events.AddEvent(e); AddShootPlayer(hitPlayerEvent); }
public override void HandleDispatchedEvt(StatisticsHitPlayerEvent hitPlayerEvent, bool isServer) { StatisticsCSPairData statisticsCsPairData; if (!battleShootStatisticsArchive.TryGetValue(hitPlayerEvent.shootKey, out statisticsCsPairData)) { statisticsCsPairData = new StatisticsCSPairData(); } var statisticsHit = ObjectAllocatorHolder <StatisticsHitPlayerEvent> .Allocate(); statisticsHit.RewindTo(hitPlayerEvent); if (isServer) { statisticsCsPairData.ShootS = statisticsHit; } else { statisticsCsPairData.ShootC = statisticsHit; } battleShootStatisticsArchive[hitPlayerEvent.shootKey] = statisticsCsPairData; }
protected virtual void AddShootPlayer(StatisticsHitPlayerEvent shootPlayerEvent) { }
public virtual void HandleDispatchedEvt(StatisticsHitPlayerEvent hitPlayerEvent, bool isServer) { throw new NotImplementedException(); }
protected override void AddShootPlayer(StatisticsHitPlayerEvent shootPlayerEvent) { entity.statisticsServerData.ServerShootPlayerTotalCount += 1; entity.localEvents.Events.AddEvent(shootPlayerEvent); }
// public override void ShowShootStatisticsTip(bool val) // { // // entity.tip.ForTest = val; // if(val) // entity.tip.Content = string.Format("Match:{0}/{1}",entity.statisticsServerData.ShootPlayerMatchCount,entity.statisticsServerData.RecordedShootTotalCount); // } protected override void AddShootPlayer(StatisticsHitPlayerEvent shootPlayerEvent) { entity.uploadEvents.Events.AddEvent(shootPlayerEvent); }