Exemple #1
0
        public void Render(DwarfGame game, DwarfTime time, GraphicsDevice g)
        {
            CurrentTool.Render(game, g, time);
            VoxSelector.Render();

            foreach (CreatureAI creature in Faction.SelectedMinions)
            {
                //Drawer2D.DrawZAlignedRect(creature.Position + Vector3.Down * 0.5f, 0.25f, 0.25f, 2, new Color(255, 255, 255, 50));
                creature.Creature.SelectionCircle.IsVisible = true;
                foreach (Task task in creature.Tasks)
                {
                    task.Render(time);
                }

                if (creature.CurrentTask != null)
                {
                    creature.CurrentTask.Render(time);
                }
            }


            DwarfGame.SpriteBatch.Begin();
            BodySelector.Render(DwarfGame.SpriteBatch);
            DwarfGame.SpriteBatch.End();
        }
Exemple #2
0
        public void Render(DwarfGame game, DwarfTime time)
        {
            CurrentTool.Render(game, time);
            VoxSelector.Render();

            foreach (var m in Faction.Minions)
            {
                if (m.Creature.SelectionCircle != null)
                {
                    m.Creature.SelectionCircle.IsVisible = false;
                }
                m.Creature.Sprite.DrawSilhouette = false;
            }
            ;

            foreach (CreatureAI creature in Faction.SelectedMinions)
            {
                if (creature.Creature.SelectionCircle != null)
                {
                    creature.Creature.SelectionCircle.IsVisible = true;
                }
                creature.Creature.Sprite.DrawSilhouette = true;

                foreach (Task task in creature.Tasks)
                {
                    if (task.IsFeasible(creature.Creature) == Task.Feasibility.Feasible)
                    {
                        task.Render(time);
                    }
                }

                if (creature.CurrentTask != null)
                {
                    creature.CurrentTask.Render(time);
                }
            }

            DwarfGame.SpriteBatch.Begin();
            BodySelector.Render(DwarfGame.SpriteBatch);
            DwarfGame.SpriteBatch.End();

            foreach (var obj in SelectedObjects)
            {
                if (obj.IsVisible && !obj.IsDead)
                {
                    Drawer3D.DrawBox(obj.GetBoundingBox(), Color.White, 0.01f, true);
                }
            }
        }
Exemple #3
0
        public void Render(DwarfGame game, DwarfTime time, GraphicsDevice g)
        {
            CurrentTool.Render(game, g, time);
            VoxSelector.Render();

            foreach (var m in Faction.Minions)
            {
                if (m.Creature.SelectionCircle != null)
                {
                    m.Creature.SelectionCircle.IsVisible = false;
                }
                m.Creature.Sprite.DrawSilhouette = false;
            }
            ;

            foreach (CreatureAI creature in Faction.SelectedMinions)
            {
                if (creature.Creature.SelectionCircle != null)
                {
                    creature.Creature.SelectionCircle.IsVisible = true;
                }
                creature.Creature.Sprite.DrawSilhouette = true;

                foreach (Task task in creature.Tasks)
                {
                    if (task.IsFeasible(creature.Creature) == Task.Feasibility.Feasible)
                    {
                        task.Render(time);
                    }
                }

                if (creature.CurrentTask != null)
                {
                    creature.CurrentTask.Render(time);
                }
            }

            DwarfGame.SpriteBatch.Begin();
            BodySelector.Render(DwarfGame.SpriteBatch);
            DwarfGame.SpriteBatch.End();
        }