コード例 #1
0
    //Mirv sprite is just a different color missile
    public IGameSprite MakeMirvSprite(Position initialPosition)
    {
      MissileSprite sprite = new MissileSprite(initialPosition, Color.YellowGreen, _missileImgPath, GameParameters.MISSILE_WIDTH, GameParameters.MISSILE_HEIGHT,_textureFlyweight);
      _spriteContainer.Add(sprite);

      return sprite;
    }
コード例 #2
0
    /// <summary>
    /// TurretShotSprite is just a different color of missile sprite, for now.
    /// </summary>
    /// <param name="initialPosition"></param>
    /// <returns></returns>
    public IGameSprite MakeTurretShotSprite(Position initialPosition)
    {
      MissileSprite turretShotSprite = new MissileSprite(initialPosition, _missileImgPath, GameParameters.MISSILE_WIDTH, GameParameters.MISSILE_HEIGHT, _textureFlyweight);
      turretShotSprite.MissileColor = Color.BlueViolet;
      _spriteContainer.Add(turretShotSprite);

      return turretShotSprite;
    }