コード例 #1
0
        public void UpdateSupplyDrop(uint channelIndex, Models.NetFieldExports.SupplyDrop supplyDrop)
        {
            if (!_drops.TryGetValue(channelIndex, out var drop))
            {
                drop = new Models.SupplyDrop(channelIndex, supplyDrop);
                MapData.SupplyDrops.Add(drop);
                _drops.Add(channelIndex, drop);
                return;
            }

            if (supplyDrop.Opened)
            {
                drop.Looted     = true;
                drop.LootedTime = ReplicatedWorldTimeSeconds;
            }

            if (supplyDrop.BalloonPopped)
            {
                drop.BalloonPopped     = true;
                drop.BalloonPoppedTime = ReplicatedWorldTimeSeconds;
            }

            if (supplyDrop.bHasSpawnedPickups)
            {
                drop.HasSpawnedPickups = true;
            }

            if (supplyDrop.LandingLocation != null)
            {
                drop.LandingLocation = supplyDrop.LandingLocation;
            }
        }
コード例 #2
0
 public SupplyDrop(uint channelIndex, NetFieldExports.SupplyDrop drop)
 {
     Id         = channelIndex;
     FallHeight = drop.FallHeight;
     FallSpeed  = drop.FallSpeed;
 }