Пример #1
0
        private void OnRangeObjectCreated(RangeObjectV2 RangeObjectV2)
        {
            var rangeTypeID = RangeObjectV2.RangeObjectInitialization.RangeTypeID;

            if (rangeTypeID != RangeTypeID.NOT_DISPLAYED)
            {
                if (!rangeRenderDatas.ContainsKey(rangeTypeID))
                {
                    rangeRenderDatas[rangeTypeID] = new Dictionary <int, AbstractRangeRenderData>();
                }

                if (RangeObjectV2.GetType() == typeof(SphereRangeObjectV2))
                {
                    var SphereRangeObjectRenderingDataProvider = new SphereRangeObjectRenderingDataProvider((SphereRangeObjectV2)RangeObjectV2, rangeTypeID);
                    var addedRange = new SphereGroundEffectManager(RangeTypeConfiguration.ConfigurationInherentData[rangeTypeID], SphereRangeObjectRenderingDataProvider);
                    addedRange.OnRangeCreated(SphereRangeObjectRenderingDataProvider);
                    rangeRenderDatas[rangeTypeID].Add(SphereRangeObjectRenderingDataProvider.BoundingCollider.GetInstanceID(), new CircleRangeRenderData(addedRange));
                }
                else if (RangeObjectV2.GetType() == typeof(BoxRangeObjectV2))
                {
                    var BoxRangeObjectRenderingDataProvider = new BoxRangeObjectRenderingDataProvider((BoxRangeObjectV2)RangeObjectV2, rangeTypeID);
                    var addedRange = new BoxGroundEffectManager(RangeTypeConfiguration.ConfigurationInherentData[rangeTypeID], BoxRangeObjectRenderingDataProvider);
                    addedRange.OnRangeCreated(BoxRangeObjectRenderingDataProvider);
                    rangeRenderDatas[rangeTypeID].Add(BoxRangeObjectRenderingDataProvider.BoundingCollider.GetInstanceID(), new BoxRangeRenderData(addedRange));
                }
                else if (RangeObjectV2.GetType() == typeof(RoundedFrustumRangeObjectV2))
                {
                    var RoundedFrustumRangeObjectRenderingDataProvider = new FrustumRangeObjectRenderingDataProvider((RoundedFrustumRangeObjectV2)RangeObjectV2, rangeTypeID);
                    var addedRange = new RoundedFrustumGroundEffectManager(RangeTypeConfiguration.ConfigurationInherentData[rangeTypeID], RoundedFrustumRangeObjectRenderingDataProvider);
                    addedRange.OnRangeCreated(RoundedFrustumRangeObjectRenderingDataProvider);
                    rangeRenderDatas[rangeTypeID].Add(RoundedFrustumRangeObjectRenderingDataProvider.BoundingCollider.GetInstanceID(), new RoundedFrustumRenderData(addedRange));
                }
            }
        }
Пример #2
0
 public FrustumGroundEffectManager(RangeTypeInherentConfigurationData rangeTypeInherentConfigurationData, FrustumRangeObjectRenderingDataProvider FrustumRangeObjectRenderingDataprovider) : base(rangeTypeInherentConfigurationData)
 {
     this.FrustumRangeObjectRenderingDataprovider = FrustumRangeObjectRenderingDataprovider;
     ObstacleOcclusionCalculationManagerV2        = ObstacleOcclusionCalculationManagerV2.Get();
 }
Пример #3
0
 public RoundedFrustumGroundEffectManager(RangeTypeInherentConfigurationData rangeTypeInherentConfigurationData, FrustumRangeObjectRenderingDataProvider RoundedFrustumRangeObjectRenderingDataProvider) : base(rangeTypeInherentConfigurationData)
 {
     this.RoundedFrustumRangeObjectRenderingDataProvider = RoundedFrustumRangeObjectRenderingDataProvider;
 }