public Level() { Units = new List<Unit>(); BehaviourFactory = new BehaviourFactory(); MoveContainer = new MoveContainer(); DrawContainer = new DrawContainer(); Difficulty = 0; }
public Unit(MoveContainer moveContainer, DrawContainer drawContainer, BehaviourFactory behaviourFactory) { MoveContainer = moveContainer; MoveBehaviour moveBehaviour = behaviourFactory.CreateMoveBehaviour(this); MoveContainer.Add(moveBehaviour); DrawContainer = drawContainer; DrawBehaviour drawBehaviour = behaviourFactory.CreateDrawBehaviour(this); DrawContainer.Add(drawBehaviour); }
public DuckEasy(MoveContainer moveContainer, DrawContainer drawContainer, BehaviourFactory behaviourFactory) : base(moveContainer, drawContainer, behaviourFactory) { Width = Properties.Settings.Default.EasyDuckWidth; Height = Properties.Settings.Default.EasyDuckHeight; Random rnd = new Random(); X = rnd.Next(Width, Properties.Settings.Default.ScreenWidth - Width); Y = rnd.Next(Height, Properties.Settings.Default.ScreenHeight - Height); Vx = Properties.Settings.Default.EasyDuckvX; Vy = Properties.Settings.Default.EasyDuckvY; }