Exemplo n.º 1
0
        public void Shoot(Vector2f dir)
        {
            switch (gun)
            {
            case "Water Gun": {
                WaterBullet b = new WaterBullet("~", pos.x, pos.y);
                b.direction = dir;
                World.AddDynamicEntity(b);
                break;
            }

            case "Cannon Gun": {
                Bullet b = new Bullet("~", pos.x, pos.y);
                b.direction = dir;
                World.AddDynamicEntity(b);
                break;
            }

            case "Confetti Gun": {
                ExplodeyBullet b = new ExplodeyBullet("*", pos.x, pos.y);
                b.direction = dir;
                World.AddDynamicEntity(b);
                break;
            }
            }
        }
Exemplo n.º 2
0
 public void Shoot( Vector2f dir )
 {
     switch( gun ) {
         case "Water Gun": {
             WaterBullet b = new WaterBullet( "~", pos.x, pos.y );
             b.direction = dir;
             World.AddDynamicEntity( b );
             break;
                           }
         case "Cannon Gun": {
             Bullet b = new Bullet( "~", pos.x, pos.y );
             b.direction = dir;
             World.AddDynamicEntity( b );
             break;
                           }
         case "Confetti Gun": {
             ExplodeyBullet b = new ExplodeyBullet( "*", pos.x, pos.y );
             b.direction = dir;
             World.AddDynamicEntity( b );
             break;
                           }
     }
 }