2 using FBClient.Screens;
3 using FBClient.Screens.GameScreens;
4 using FBClient.Sprites;
5 using FBClient.WorldEngine;
6 using Microsoft.Xna.Framework;
7 using Microsoft.Xna.Framework.Graphics;
9 namespace FBClient.Core.Entities
15 private bool _isAlive;
20 #region Property Region
24 get {
return _isAlive; }
29 #region Constructor Region
34 var spriteTexture = FinalBomber.Instance.Content.Load<Texture2D>(
"Graphics/Characters/teleporter");
35 var animation =
new Animation(2, 32, 32, 0, 0, 2);
36 Sprite =
new AnimatedSprite(spriteTexture, animation) { IsAnimating =
true };
43 #region XNA Method Region
45 public void Update(GameTime gameTime)
47 Sprite.Update(gameTime);
50 public void Draw(GameTime gameTime)
52 Sprite.Draw(gameTime, FinalBomber.Instance.SpriteBatch, Position);
57 #region Public Method Region
61 bool allTeleporterCellTaken =
true;
65 Point position = t.CellPosition;
66 if (position != CellPosition && map.Board[position.X, position.Y] is
Teleporter)
67 allTeleporterCellTaken =
false;
70 if (!allTeleporterCellTaken)
72 Point position = CellPosition;
73 while (position == CellPosition)
75 position = FinalBomber.Instance.GamePlayScreen.TeleporterList[
76 GamePlayScreen.Random.Next(FinalBomber.Instance.GamePlayScreen.TeleporterList.Count)].
80 var bomb = entity as
Bomb;
83 bomb.ChangeSpeed(bomb.Speed + Config.BombSpeedIncrementeur);
85 bomb.ChangePosition(position);
88 entity.ChangePosition(position);
94 #region Override Method Region
void ChangeEntityPosition(DynamicEntity entity, Map map)
void Draw(GameTime gameTime)
Teleporter(Point cellPosition)
void Update(GameTime gameTime)