Example #1
0
        // CONSTRUCTOR
        public Derp(double x, double y, TEAM team, DerpStats stats, DerpManager manager, List <Node> path)
        {
            this.x = x;
            this.y = y;

            this.team  = team;
            this.stats = stats;

            this.manager = manager;
            this.path    = path;

            if (team == TEAM.HOME)
            {
                pathID = 1;
            }
            else
            {
                pathID = path.Count - 2;
            }

            myID = nextDerpID++;

            // Set up my image!
            baseTexture = baseTextures["e0s1"];
            baseOffset  = baseOffsets["e0s1"];
        }
Example #2
0
        public void SpawnDerp(int xPos, int yPos, TEAM team, DerpStats stats)
        {
            int yStart = yPos / Field.BLOCK_HEIGHT;

            if (pathTraversals[yStart] == null)
            {
                MessageBox.Show("Failed to Spawn Derp at " + xPos + " " + yPos + ". No Hub.");
                return;
            }

            Derp babyDerp = new Derp(xPos, yPos, team, stats, this, pathTraversals[yStart]);

            // Add new derp to complete lists of derps
            derpsHash.Add(babyDerp.myID, babyDerp);
            derpsSpeed.Add(babyDerp.stats.key, babyDerp);

            // Also add the derp to its team-specific list
            if (team == TEAM.HOME)
            {
                homeDerps.Add(babyDerp);
            }
            else
            {
                awayDerps.Add(babyDerp);
            }
        }
Example #3
0
        public Derp(double x, double y, int team)
        {
            ContentManager Content = Game.game.Content;

            this.x    = x;
            this.y    = y;
            facing    = direction.EAST;
            state     = derpState.MOVING;
            stats     = new DerpStats(10, 1, 1, 1, 0, 0, 0, 0);
            this.team = team;

            if (team == 1)
            {
                graphic = Content.Load <Texture2D>(@"GameBlocks\Derp_1");
            }
            else if (team == 2)
            {
                graphic = Content.Load <Texture2D>(@"GameBlocks\Derp_2");
            }
        }