예제 #1
0
        public StaticElement GenerateMyBoom(ContentManager myContent, float aScale, Vector2 aPosition, int aTimeToLive)
        {
            StaticElement boom = new StaticElement(aScale, aPosition, aTimeToLive);

            boom.LoadContent(myContent, "Elements/Boom");
            return(boom);
        }
예제 #2
0
        private void GenerateInitialIceberg(ContentManager myContent)
        {
            myIceberg = new StaticElement(1.0f, new Vector2(0, 0));
            myIceberg.LoadContent(myContent, "Elements/Iceberg");
            int minX     = ((myGraphics.PreferredBackBufferWidth / myIceberg.AccessSize.Width) - 2) * myIceberg.AccessSize.Width;
            int maxX     = myGraphics.PreferredBackBufferWidth - myIceberg.AccessSize.Width;
            int icebergX = RandomNumber.Between(minX, maxX);
            int icebergY = 130;

            myIceberg.AccessPosition = new Vector2(icebergX, icebergY);
        }