Ejemplo n.º 1
0
 public Dust(Point p, RoomEnvironment r)
     : base(p, r)
 {
     base.color = Dust.objcolor;
     base.type  = Dust.objtype;
     room.SynchronizeColor(p);
 }
Ejemplo n.º 2
0
 public Obstacle(Point p, RoomEnvironment r, bool i)
     : base(p, r, i)
 {
     base.color = Obstacle.objcolor;
     base.type  = Obstacle.objtype;
     room.SynchronizeColor(p);
 }
Ejemplo n.º 3
0
 public Agent(Point p, RoomEnvironment r, string d)
     : base(p, r, true)
 {
     if (base.room.DCAgent != null)
     {
         r.Remove_Agent();
     }
     base.color         = Agent.objcolor;
     base.type          = Agent.objtype;
     base.room.DCAgent  = this;
     this.InnerPosition = new Point(0, 0);
     this.direction     = d;
     this.action        = "start";
     room.SynchronizeColor(p);
 }
Ejemplo n.º 4
0
 public RoomObject(Point p, RoomEnvironment r, bool i = false)
 {
     position = p;
     room     = r;
     color    = RoomObject.objcolor;
     type     = RoomObject.objtype;
     UpdateMovableState(i);
     if (room.Map != null)
     {
         Below = room.Map[p.X, p.Y];
         room.UpdateRoomObject(p, this);
         if (Below != null && (Below.type == Process.SetAgent || Below.type == Process.SetObstacles))
         {
             Below = null;
         }
     }
 }
Ejemplo n.º 5
0
        public MainForm()
        {
            InitializeComponent();
            this.Text  = "Dust Collector";
            RSForm     = new RoomSizeForm(this);
            SRForm     = new SetRandomForm(this);
            SFForm     = new SetForwardForm(this);
            Processing = Process.None;

            RoomDisplay            = new DBLayoutPanel();
            RoomDisplay.Parent     = MainPanel;
            RoomDisplay.Dock       = DockStyle.Fill;
            RoomDisplay.CellPaint += Environment_CellPaint;
            RoomDisplay.BackColor  = Color.White;

            Room            = new RoomEnvironment(RoomDisplay, this);
            this.timePassed = 0;
        }