Ejemplo n.º 1
0
 private void TalkTingle()
 {
     player.ResetMoveSpeed();
     player.MoveBack();
     frmTingle = new FrmTingle(tingleRelationship, tingleGiftGiven, player);
     frmTingle.Show();
 }
Ejemplo n.º 2
0
        private void FrmLevel_Load(object sender, EventArgs e)
        {
            const int PADDING   = 7;
            const int NUM_WALLS = 13;

            player      = new Player(CreatePosition(picPlayer), CreateCollider(picPlayer, PADDING));
            tingle      = new NPC(CreatePosition(picTingle), CreateCollider(picTingle, PADDING));
            bossKoolaid = new Enemy(CreatePosition(picBossKoolAid), CreateCollider(picBossKoolAid, PADDING));
            bossKoolaid.personalItem       = new Items("Trophy", 100);
            enemyPoisonPacket              = new Enemy(CreatePosition(picEnemyPoisonPacket), CreateCollider(picEnemyPoisonPacket, PADDING));
            enemyPoisonPacket.personalItem = new Items("Poison Bomb", 5);
            enemyCheeto = new Enemy(CreatePosition(picEnemyCheeto), CreateCollider(picEnemyCheeto, PADDING));
            enemyCheeto.personalItem = new Items("Cleaver", 8);
            enemySmiley = new Enemy(CreatePosition(picEnemySmiley), CreateCollider(picEnemySmiley, PADDING));
            enemySmiley.personalItem = new Items("Smile", 10, "HEALTH");

            bossKoolaid.Img       = picBossKoolAid.BackgroundImage;
            enemyPoisonPacket.Img = picEnemyPoisonPacket.BackgroundImage;
            enemyCheeto.Img       = picEnemyCheeto.BackgroundImage;
            enemySmiley.Img       = picEnemySmiley.BackgroundImage;

            bossKoolaid.Color       = Color.Red;
            enemyPoisonPacket.Color = Color.Green;
            enemyCheeto.Color       = Color.FromArgb(255, 245, 161);
            txtWeapons.Visible      = false;
            txtHealth.Visible       = false;

            walls = new Character[NUM_WALLS];
            for (int w = 0; w < NUM_WALLS; w++)
            {
                PictureBox pic = Controls.Find("picWall" + w.ToString(), true)[0] as PictureBox;
                walls[w] = new Character(CreatePosition(pic), CreateCollider(pic, PADDING));
            }

            frmTingle   = new FrmTingle(tingleRelationship, tingleGiftGiven, player);
            Game.player = player;
            timeBegin   = DateTime.Now;
        }