コード例 #1
0
ファイル: MainUiBlock.cs プロジェクト: Foxbow74/my-busycator
		public MainUiBlock(int _width, int _height)
			: base(new Rct(0, 0, _width, _height), null, FColor.White)
		{
			m_messages = new TurnMessageUiBlock(new Rct(Rct.Left, 0, Rct.Width, MESSAGES_HEIGHT)) {BackgroundColor = FColor.FromArgb(255, 30, 30, 30)};
			m_map = new MapUiBlock(new Rct(ContentRct.Left, m_messages.Rct.Height, Rct.Width, Rct.Height - m_messages.Rct.Height - STAT_HEIGHT));
			m_stats = new StatsBlock(new Rct(0, Rct.Bottom - STAT_HEIGHT + 1, Rct.Width, STAT_HEIGHT)) {BackgroundColor = FColor.FromArgb(255, 0, 30, 30)};
		}
コード例 #2
0
        public SelectTargetUiBlock(TurnMessageUiBlock _messages, Rct _mapRct, AskMessage _message)
            : base(_mapRct, null, FColor.Gray)
        {
            m_messages    = _messages;
            m_act         = _message.Act;
            m_maxDistance = _message.GetFirstParameter <int>();
            var points = new List <Point>();

            for (var x = -m_maxDistance; x < m_maxDistance; ++x)
            {
                for (var y = -m_maxDistance; y < m_maxDistance; ++y)
                {
                    var point = new Point(x, y);
                    if (point.Lenght > m_maxDistance)
                    {
                        continue;
                    }

                    var liveCell = World.TheWorld.Avatar[point];
                    if (liveCell.Creature != null && !liveCell.Creature.IsAvatar)
                    {
                        points.Add(point);
                    }
                }
            }

            m_targets.AddRange(points.Where(_point => _point.Lenght < m_maxDistance).OrderBy(_point => _point.Lenght));

            Rebuild();
        }
コード例 #3
0
		public SelectTargetUiBlock(TurnMessageUiBlock _messages, Rct _mapRct, AskMessage _message)
			: base(_mapRct, null, FColor.Gray)
		{
			m_messages = _messages;
			m_act = _message.Act;
			m_maxDistance = _message.GetFirstParameter<int>();
			var points = new List<Point>();

			for (var x = -m_maxDistance; x < m_maxDistance; ++x)
			{
				for (var y = -m_maxDistance; y < m_maxDistance; ++y)
				{
					var point = new Point(x, y);
					if (point.Lenght > m_maxDistance) continue;

					var liveCell = World.TheWorld.Avatar[point];
					if (liveCell.Creature != null && !liveCell.Creature.IsAvatar)
					{
						points.Add(point);
					}
				}
			}

			m_targets.AddRange(points.Where(_point => _point.Lenght < m_maxDistance).OrderBy(_point => _point.Lenght));

			Rebuild();
		}
コード例 #4
0
 public SelectDestinationUiBlock(TurnMessageUiBlock _messages, Rct _mapRct, Act _act)
     : base(_mapRct, null, FColor.Gray)
 {
     m_messages = _messages;
     m_act      = _act;
     Rebuild();
 }
コード例 #5
0
		public SelectDestinationUiBlock(TurnMessageUiBlock _messages, Rct _mapRct, Act _act)
			: base(_mapRct, null, FColor.Gray)
		{
			m_messages = _messages;
			m_act = _act;
			Rebuild();
		}
コード例 #6
0
ファイル: MainUiBlock.cs プロジェクト: Foxbow74/my-busycator
 public MainUiBlock(int _width, int _height)
     : base(new Rct(0, 0, _width, _height), null, FColor.White)
 {
     m_messages = new TurnMessageUiBlock(new Rct(Rct.Left, 0, Rct.Width, MESSAGES_HEIGHT))
     {
         BackgroundColor = FColor.FromArgb(255, 30, 30, 30)
     };
     m_map   = new MapUiBlock(new Rct(ContentRct.Left, m_messages.Rct.Height, Rct.Width, Rct.Height - m_messages.Rct.Height - STAT_HEIGHT));
     m_stats = new StatsBlock(new Rct(0, Rct.Bottom - STAT_HEIGHT + 1, Rct.Width, STAT_HEIGHT))
     {
         BackgroundColor = FColor.FromArgb(255, 0, 30, 30)
     };
 }
コード例 #7
0
 public LookAtUiBlock(TurnMessageUiBlock _messages, Rct _mapRct)
     : base(_mapRct, null, FColor.Gray)
 {
     m_messages = _messages;
     Rebuild();
 }
コード例 #8
0
		public LookAtUiBlock(TurnMessageUiBlock _messages, Rct _mapRct)
			: base(_mapRct, null, FColor.Gray)
		{
			m_messages = _messages;
			Rebuild();
		}