public Cloud(int cloudNumber, ContentManager Content, mouseHelp mouse, Dog dog, Vector2 pos, Boolean direction)
        {
            this.cloudNumber = cloudNumber;
            this.mouse = mouse;
            this.dog = dog;
            this.cloudPos = pos;

            rand = new Random();

            cloudImage = Content.Load<Texture2D>("Textures/cloud" + cloudNumber);

            cloudRec = new Rectangle(0, 0, cloudImage.Width, cloudImage.Height);

            cloudScale = 0.8f +((float)rand.NextDouble() - 0.5f) / 10f;

            if (direction == true)
            {
                move = ((float)rand.NextDouble() / 10f);
            }
            else
            {
                move = (((float)rand.NextDouble() - 1.0f) / 10f);
            }

            cloudZ = 0.7f - Math.Abs(move) / 100f;
        }
예제 #2
0
        public Poo(int pooNumber, ContentManager Content, mouseHelp mouse, Dog dog, AppDJ appDJ)
        {
            this.pooNumber = pooNumber;
            this.mouse = mouse;
            this.dog = dog;
            this.appDJ = appDJ;
            screenHeight = 480;
            screenWidth = 800;

            grabbedPoo = false;

            randX = new Random();
            randY = new Random();

            pooPos = new Vector2(randX.Next((int)((float)screenWidth * .07), (int)((float)screenWidth * .90)), randY.Next((int)((float)screenHeight * .35), (int)((float)screenHeight * .94)));
            pooStart = pooPos;

            pooScale = pooPos.Y / 500.0f;
            pooZ = 0.6f - pooScale / 100.0f;

            pooImage = Content.Load<Texture2D>("Textures/actPoo" + pooNumber);

            pooRec = new Rectangle(0, 0, pooImage.Width, pooImage.Height);
            bagRec = new Rectangle((int)((float)screenWidth * .80), (int)((float)screenHeight * .75), pooImage.Width + (int)((float)screenWidth * .80), pooImage.Height + (int)((float)screenWidth * .75));
        }
예제 #3
0
        public Tug(Dog dog, mouseHelp mouse, AppDJ appDJ)
        {
            this.dog = dog;
            this.mouse = mouse;
            this.appDJ = appDJ;
            screenHeight = 480;
            screenWidth = 800;

            restart();
        }
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            graphics.IsFullScreen = true;
            screenHeight = 480;
            screenWidth = 800;
            graphics.PreferredBackBufferWidth = 800;
            graphics.PreferredBackBufferHeight = 480;
            graphics.ApplyChanges();

            mouse = new mouseHelp();

            actionSlider = new actionSlider(mouse, screenWidth, screenHeight);

            appDJ = new AppDJ();

            dog = new Dog(mouse, appDJ);

            // Frame rate is 30 fps by default for Windows Phone.
            //TargetElapsedTime = TimeSpan.FromTicks(333333);

            // Extend battery life under lock.
            //InactiveSleepTime = TimeSpan.FromSeconds(1);
        }