コード例 #1
0
        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);
        }
コード例 #2
0
        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;
        }
コード例 #3
0
 protected virtual void AddShootPlayer(StatisticsHitPlayerEvent shootPlayerEvent)
 {
 }
コード例 #4
0
 public virtual void HandleDispatchedEvt(StatisticsHitPlayerEvent hitPlayerEvent, bool isServer)
 {
     throw new NotImplementedException();
 }
コード例 #5
0
 protected override void AddShootPlayer(StatisticsHitPlayerEvent shootPlayerEvent)
 {
     entity.statisticsServerData.ServerShootPlayerTotalCount += 1;
     entity.localEvents.Events.AddEvent(shootPlayerEvent);
 }
コード例 #6
0
        // 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);
        }