public Form1() { InitializeComponent(); sim = new SimEngine(panel1); this.SetupGui(); }
// 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(); }
// 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(); }