예제 #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 RoundedFrustumRenderData(RoundedFrustumGroundEffectManager roundedFrustumGroundEffectManager) : base()
 {
     GroundEffectManager       = roundedFrustumGroundEffectManager;
     roundedFrustumRangeBuffer = new DynamicComputeBufferManager <RoundedFrustumRangeBufferData>(RoundedFrustumRangeBufferData.GetByteSize(), "RoundedFrustumRangeBuffer", string.Empty, matPro);
 }