示例#1
0
        private void DrawMonster(SpriteBatch spriteBatch, Monster monster, int offset = 0)
        {
            DrawBasicData(spriteBatch, monster, offset);

            int row = nextRow();
            DrawIcon(spriteBatch, ImageProvider.Instance.GetImage(ImageListEnum.TOKENS_DEFENSE_ICON), row + offset);
            DrawDefense(spriteBatch, monster, row + offset);
        }
示例#2
0
        private void PickMonstersPlace()
        {
            if (actMonsterToPlace == null)
            {
                return;
            }

            var fieldForPick = GameplayProgress.Instance.Scenario.GetFocusedFieldForPick();
            var actFields = actMonsterToPlace.GetPlaceableFields(fieldForPick);
            if (actFields != null )
            {
                foreach (var field in actFields)
                {
                    if (field != null && field.ObjectsOnField.Count == 0 && GameplayProgress.Instance.Scenario.HasUnplacedMonster())
                    {
                        field.ObjectsOnField.Add(actMonsterToPlace);
                        actMonsterToPlace.Position = fieldForPick;
                    }
                    else if (field != null)
                    {
                        field.ObjectsOnField.Add(actMonsterToPlace);
                    }
                }
                actMonsterToPlace = null;
            }

            PrepareMonstersToPlace();
        }
示例#3
0
        private void PrepareMonstersToPlace()
        {
            if (!GameplayProgress.Instance.Scenario.HasUnplacedMonster())
            {
                GameplayProgress.Instance.Scenario.PrepareNextMonsterGroup();
            }

            if (actMonsterToPlace == null)
            {
                actMonsterToPlace = GameplayProgress.Instance.Scenario.GetUnplacedMonster();

                if (actMonsterToPlace == null)
                {
                    GameplayProgress.Instance.Scenario.NextStage();
                    GameplayProgress.Instance.GetChooseHeroDialog().Show();
                }
            }

            GameplayProgress.Instance.ActCharacter = actMonsterToPlace;
        }