Exemplo n.º 1
0
        static void Main(string[] args)
        {
            CreateDownloadFolder();
            BackgroundChange change = BackgroundChange.Always;

            if (args.Length > 0)
            {
                try {
                    change = (BackgroundChange)Enum.Parse(typeof(BackgroundChange), args[0]);
                }
                catch (ArgumentException ae)
                {
                }
            }

            IPrecedenceCreator picker = new DefaultPrecedencePicker();
            ILogger            logger = new DefaultLogger();

            if (File.Exists("Precedences.txt"))
            {
                using (StreamReader reader = new StreamReader("Precedences.txt"))
                {
                    picker = new DefaultPrecedencePicker(reader.ReadToEnd());
                }
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Application.Run(new MainFormController(picker, logger, change));
        }
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(this.gameObject);
     }
     RenderSettings.skybox = skyboxMat;
     OnLevelWasLoaded(0);
 }
Exemplo n.º 3
0
 protected override void Startup(BackgroundChange change)
 {
     if (change > BackgroundChange.Never)
     {
         ChangeBackground();
     }
     if (change == BackgroundChange.Always)
     {
         ChangeOnResize = true;
     }
     if (change == BackgroundChange.Never)
     {
         _form.Controls.OfType <CustomLabel>()
         .ToList().ForEach(element => element.OutlineForeColor = Color.Gray);
     }
 }
Exemplo n.º 4
0
 protected abstract void Startup(BackgroundChange change);
Exemplo n.º 5
0
 public BackgroundHandler(BackgroundChange change, Form form)
 {
     _form = form;
     Startup(change);
 }
Exemplo n.º 6
0
 public MainFormController(IPrecedenceCreator precedence, ILogger logger, BackgroundChange change) : this()
 {
     _logger     = logger;
     _precedence = precedence;
     Handler     = new DefaultBackgroundHandler(change, this);
 }
Exemplo n.º 7
0
 public DefaultBackgroundHandler(BackgroundChange change, Form form) : base(change, form)
 {
 }
Exemplo n.º 8
0
 private void Awake()
 {
     day += 0.33333f;
     backgroundChange = FindObjectOfType <BackgroundChange>();
     dialogueManager  = FindObjectOfType <DialogueManager>();
 }