public void AddToTeam(UnitComponent myComp)
 {
     unitCompList.Add(myComp);
     unitEntityList.Add(myComp._parent);
 }
        public void CreateUnit(Vector2 myCoordinate, Texture2DFramed myFramedTexture, UnitData myUnitData)
        {
            HexComponent hexComp = GetHex(myCoordinate);

            if (hexComp.GetUnit() == null)
            {
                SpriteComponent hexSprite = GetHex(myCoordinate)._parent.GetDrawable("SpriteComponent") as SpriteComponent;

                Entity unitEntity = new Entity(15, State.ScreenState.SKIRMISH);

                AnimatedSpriteComponent unitSprite = new AnimatedSpriteComponent(true, hexSprite.GetCenterPosition(), myFramedTexture);

                unitEntity.AddComponent(unitSprite);

                UnitComponent unitComp = new UnitComponent(GetHex(myCoordinate), true);
                unitComp.SetUnitData(myUnitData);
                unitEntity.AddComponent(unitComp);

                EntityManager.AddEntity(unitEntity);

                alliedUnitList.Add(unitEntity);
                totalUnitList.Add(unitEntity);

                hexComp.SetUnit(unitComp);
                UpdateVisibilityAllies();
            }
            else
            {
                throw new Exception("There is already a unit where you are trying to create one.");
            }
        }
 public void AddToSeenUnitList(UnitComponent unit)
 {
     seenUnitList.Add(unit);
 }
 public void AddToKnownUnitList(UnitComponent unit)
 {
     knownUnitList.Add(unit);
 }
        public static void Initialize()
        {
            State.screenState = State.ScreenState.WORLD_MAP;
            State.selectionState = State.SelectionState.NoSelection;
            State.battleState = State.BattleState.Attack;

            State.screenWidth = 0;
            State.screenHeight = 0;

            State.dialoguePosition = 0;//Which textbox you're in
            State.dialogueChoicePosition = 0;
            State.displayedDialogueMessage = "";

            State.dialogueLinePosition = 0;
            State.dialogueWordPosition = 0;
            State.dialogueCharacterPosition = 0;

            State.firstDialogueWord = "";
            State.lastTimeDialogueChecked = 0;
            State.messageBegin = false;
            State.currentDialogueMessage = new List<string>();

            State.originalHexClicked = null;

            State.currentAttacker = null;
            State.currentDefender = null;

            State.battleMessage = "";

            State.attackerBattleStatus = BattleStatus.NoStatus;
            State.defenderBattleStatus = BattleStatus.NoStatus;

            State.enemyMoveIndex = 0;
            State.firstTimeEnemyTurn = true;

            State.elapsedTimeForMove = 0;

            State.font = null;
        }
 public void SetUnit(UnitComponent myUnit)
 {
     unit = myUnit;
 }
 public void RemoveUnit()
 {
     unit = null;
 }