public BrainBase(IRobot robot, IStand stand) { Robot = robot; Stand = stand; IsRobotLoaded = false; TargetLocation = Robot.Environment.GetObjectsCoordinatesOnTheMap()["Counter"]; robot.OnTick += Robot_OnTick; }
private void OnStand(string name) { IStand stand = StandFactory(name); if (stand == null) { return; } stand.StandRemoved += () => { StandsOpened.Remove(stand); SaveStandsOpened(); }; stand.StandChanged += SaveStandsOpened; StandsOpened.Add(stand); SaveStandsOpened(); OnSync(); }
public void LoadStands() { StandList.Clear(); if (Directory.Exists("Resources")) { foreach (string standFile in Directory.EnumerateFiles("Resources", "*.gif")) { StandList.Add(Path.GetFileNameWithoutExtension(standFile)); } } StandsOpened.Clear(); Option.Load(OptionFile); foreach (StandData data in Option.Stands) { IStand stand = StandFactory(data.Name); if (stand == null) { continue; } stand.StandX = data.X; stand.StandY = data.Y; stand.StandTopmost = data.Topmost; stand.StandRemoved += () => { StandsOpened.Remove(stand); SaveStandsOpened(); }; stand.StandChanged += SaveStandsOpened; StandsOpened.Add(stand); } OnSync(); }
/// <summary> /// Initializes a new instance of the <see cref="Camera"/> class. /// </summary> /// <param name="stand">The stand which contains the view matrix.</param> /// <param name="lense">The lense which contains the projection matrix.</param> public Camera(IStand stand, ILense lense) { Stand = stand; Lense = lense; }
/// <summary> /// Initializes a new instance of the <see cref="Camera"/> class. /// </summary> /// <param name="stand">The stand which contains the view matrix.</param> /// <param name="lens">The lens which contains the projection matrix.</param> public Camera(IStand stand, ILens lens) { Stand = stand; Lens = lens; }