Пример #1
1
        public Dog(mouseHelp mouse, AppDJ appDJ)
        {
            this.appDJ = appDJ;
            this.mouse = mouse;
            screenHeight = 480;
            screenWidth = 800;

            fetch = new Fetch(this, this.mouse, this.appDJ);
            water = new Water(this, this.mouse, this.appDJ);
            food = new Food(this, this.mouse, this.appDJ);
            tug = new Tug(this, this.mouse, this.appDJ);

            statThirst = 1.0f;
            statHygiene = 1.0f;
            statHunger = 1.0f;
            statEntertainment = 1.0f;
            statHappiness = 1.0f;
            myActivity = activity.dogIdle;
            myAnimate = animate.dogSitting;
            aniX = 0;
            aniY = 0;
            myFPS = 0;
            FPS = 12;
            returnHome = false;
            tugBool = false;

            dogX = (int)((float)screenWidth * .51);
            dogY = (int)((float)screenHeight * .54);
            dogZ = 0.5f;
            dogScale = 1.0f;
            dogRec = new Rectangle(0, 0, 200, 200);
            dogRot = 0.0f;
            origin = new Vector2(dogX, dogY);
            dogPos = new Vector2(dogX, dogY);
            returnSpeedX = 2;
            returnSpeedY = 1;
            returnSpeedS = .005f;
        }
Пример #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);
        }