Ejemplo n.º 1
0
        public void SetUp()
        {
            containingObject = new GameObject();
#pragma warning disable 0618
            subject = containingObject.AddComponent <Vector3Cache>();
#pragma warning restore 0618
        }
Ejemplo n.º 2
0
        public ParticleSystemSettings(string TextureName, int MaxParticles, int NumberOfImages, BlendState BlendState, bool RotateTowardCamera)
        {
            this.TextureName        = TextureName;
            this.MaxParticles       = MaxParticles;
            this.NumberOfImages     = NumberOfImages;
            this.BlendState         = BlendState;
            this.RotateTowardCamera = RotateTowardCamera;

            DurationCache = new FloatCache(10f, 10f);
            OffsetCache   = new Vector3Cache(new Vector3(-50f, -5f, -50f), new Vector3(50f, 0f, 5f));
            ScaleCache    = new Vector2Cache(new Vector2(0.01f, 0.01f), new Vector2(0.1f, 0.1f));
            RotationCache = new Vector3Cache(new Vector3(0f, -2f, -1f), new Vector3(0f, 2f, 1f));
            SpeedCache    = new Vector3Cache(new Vector3(0f, -10f, 0f), new Vector3(0f, -25f, 0f));
        }
Ejemplo n.º 3
0
        public AdvancedParticleSystemSettings(string TextureName, int MaxParticles, int NumberOfImages, BlendState BlendState, bool RotateTowardCamera)
        {
            this.TextureName        = TextureName;
            this.MaxParticles       = MaxParticles;
            this.NumberOfImages     = NumberOfImages;
            this.BlendState         = BlendState;
            this.RotateTowardCamera = RotateTowardCamera;

            DurationCache = new FloatCache(10f, 10f);
            OffsetCache   = new Vector3Cache(new Vector3(-50f, -5f, -50f), new Vector3(50f, 0f, 5f));

            ScaleCache = new Vector2Cache(new Vector2(0.01f, 0.01f), new Vector2(0.1f, 0.1f));

            List <Vector2ValuesOverTime.ValueAtTime> ListScaleValuesOverTime = new List <Vector2ValuesOverTime.ValueAtTime>();

            ListScaleValuesOverTime.Add(new Vector2ValuesOverTime.ValueAtTime(0f, Vector2.Zero));
            ListScaleValuesOverTime.Add(new Vector2ValuesOverTime.ValueAtTime(1f, Vector2.One));

            ScaleValuesOverTime = new Vector2ValuesOverTime[NumberOfSeeds];
            for (int S = 0; S < NumberOfSeeds; ++S)
            {
                Vector2 Min = ScaleCache.GetNextVector2();
                Vector2 Max = ScaleCache.GetNextVector2();

                if (Max.X < Min.X)
                {
                    float Temp = Max.X;
                    Max.X = Min.X;
                    Min.X = Temp;
                }
                if (Max.Y < Min.Y)
                {
                    float Temp = Max.Y;
                    Max.Y = Min.Y;
                    Min.Y = Temp;
                }

                ScaleValuesOverTime[S] = new Vector2ValuesOverTime(5, Min, Max, ListScaleValuesOverTime);
            }
        }
Ejemplo n.º 4
0
 public void SetUp()
 {
     containingObject = new GameObject();
     subject          = containingObject.AddComponent <Vector3Cache>();
 }