예제 #1
0
파일: Blocker.cs 프로젝트: heyx3/GGJ2014
 public Blocker(Utilities.Graphics.AnimatedSprite sprite, Shape colShape, bool isAbovePlayer, float maxSpeed = 0.0f, float mass = 1.0f)
     : base(colShape, Single.PositiveInfinity, maxSpeed)
 {
     IsAbovePlayer = isAbovePlayer;
     Sprite = sprite;
     Mass = mass;
 }
예제 #2
0
        public Bacteria(Microsoft.Xna.Framework.Vector2 pos, float zoomScale)
            : base(ArtAssets1.GoodBacteria, ArtAssets1.GoodBacteriaShape(pos, zoomScale), false, Single.PositiveInfinity, PhysicsData1.GoodBacteriaMass)
        {
            IsInfected = false;

            Sprite = new Utilities.Graphics.AnimatedSprite(Sprite);
            Sprite.DrawArgs.Rotation = Utilities.Math.UsefulMath.RandomF(-Microsoft.Xna.Framework.MathHelper.Pi,
                                                                         Microsoft.Xna.Framework.MathHelper.Pi);
            Rotation = Sprite.DrawArgs.Rotation;

            Velocity = zoomScale * new V2(Utilities.Math.UsefulMath.RandomF(-1.0f, 1.0f) * PhysicsData1.BacteriaDriftMaxSpeed,
                                          Utilities.Math.UsefulMath.RandomF(-1.0f, 1.0f) * PhysicsData1.BacteriaDriftMaxSpeed);
        }