public Hypeometer(TaskManager manager, int x, int y, int width, int height, int maxHype)
 {
     BaseArea = new Rectangle(x, y, width, height);
     Height = height;
     MaxHype = maxHype;
     Manager = manager;
     Instance = this;
 }
Exemplo n.º 2
0
 public Task(int requiredWork, string name, TaskManager manager)
     : this()
 {
     RequiredWork = requiredWork;
     Name = name;
     CurrentWork = 0;
     Manager = manager;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            graphics.PreferredBackBufferWidth = 1000;
            graphics.PreferredBackBufferHeight = 600;
            graphics.ApplyChanges();
            ScreenSize = new Vector2(GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height);

            TimingManager = new TimingManager();
            TaskManager = new TaskManager();
            EmployeeManager = new EmployeeManager();
            TaskManager.EmployeeManager = EmployeeManager;
            EmployeeManager.TaskManager = TaskManager;

            TimingManager.Second += UpdateManagers;
            TimingManager.NewEmployee += NewEmployee;
            TimingManager.StartTimers();

            NameGenerator.SetNicknameMode(NameGenerator.NicknameMode.Half);

            //TimingManager.UpdateTimer_Elapsed
            EmployeeManager.AddEmployee();

            Hypeometer = new Hypeometer(TaskManager, (int)ScreenSize.X - 40, 100, 40, 500, 10000);
            Hypeometer.AddEvent(new Hypeometer.HypeEvent("Shit", "Shit hits the fan", 3000, TestHypeEvent));

            base.Initialize();
        }