Пример #1
0
		public void UnlockAvatar(Content.Avatars avatar)
		{
			switch (avatar)
			{
			case Content.Avatars.Dragon:
				unlockedAvatar = new Dragon();
				if (!AvailableAvatars.Contains(unlockedAvatar))
					AvailableAvatars.Add(unlockedAvatar);
				break;

			case Content.Avatars.Penguin:
				unlockedAvatar = new Penguin();
				if (!AvailableAvatars.Contains(unlockedAvatar))
					AvailableAvatars.Add(unlockedAvatar);
				break;

			case Content.Avatars.PiggyBank:
				unlockedAvatar = new PiggyBank();
				if (!AvailableAvatars.Contains(unlockedAvatar))
					AvailableAvatars.Add(unlockedAvatar);
				break;
			}

			if (AvailableAvatars.Count == 1)
				ChangeAvatar(avatar);
		}
Пример #2
0
		public void SetUp()
		{
			new Level(new Size(5, 5));
			Randomizer.Use(new FixedRandom(new[] { 0.1f, 0.2f, 0.3f }));
			pig = new PiggyBank();
			pig.PerformAttack(AvatarAttack.PiggyBankCoinMinefield, Vector2D.Unused);
			coins = EntitiesRunner.Current.GetEntitiesOfType<Coin>();
		}