Пример #1
0
        public Form1()
        {
            InitializeComponent();
            sim = new SimEngine(panel1);

            this.SetupGui();
        }
Пример #2
0
        // konstruktor podstawowy
        public Creature(Panel parent, SimEngine sim, float x = 0, float y = 0, int dir = 0)
        {
            InitializeComponent();
            this.sim = sim;
            Parent   = parent;

            this.x   = x;
            this.y   = y;
            this.ang = dir;

            Width  = size;
            Height = size;

            this.Step();
        }
Пример #3
0
        // konstruktor klonujący
        public Creature(Creature parent)
        {
            InitializeComponent();
            this.sim = parent.sim;
            Parent   = parent.Parent;

            this.x     = parent.x;
            this.y     = parent.y;
            this.ang   = parent.ang;
            this.Sense = parent.Sense;
            this.Speed = parent.Speed;

            Width  = size;
            Height = size;

            this.Envolve();
            this.Step();
        }