void Start() { fm = GameObject.Find("Managers").GetComponent <FireworksManager> (); audio = GameObject.Find("Managers").GetComponent <AudioSource> (); vm = GameObject.Find("Managers").GetComponent <VariableManager> (); tm = GameObject.Find("Managers").GetComponent <TextManager> (); }
public MainForm(FireworksManager fireworksManager) { _fireworksManager = fireworksManager; InitializeComponent(); if (Settings.Default.WindowLocation != null) { this.Location = Settings.Default.WindowLocation; } // Set window size if (Settings.Default.WindowSize != null) { this.Size = Settings.Default.WindowSize; } PopulateMenuStrip(); Text = Application.ProductName; // Pass object reference to document manager documentManager.Subscribe(this); // Open the document passed by command line if (!string.IsNullOrEmpty(fireworksManager.FilePath)) { documentManager.OpenFilePath(fireworksManager.FilePath); this.WindowState = FormWindowState.Maximized; } Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath); }
void Start() { uiManager = GameObject.Find("Canvas").GetComponent <UIManager>(); spawnManager = GameObject.Find("Spawner").GetComponent <SpawnManager>(); fireworksManager = fireworksObject.GetComponent <FireworksManager>(); mainGameMusic = Camera.main.transform.GetComponent <AudioSource>(); ResetScore(); }
private void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } }
static void Main(string[] args) { // try // { var fireworksManager = new FireworksManager(new Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream("IsWiX.IsWiX.bmp"))); fireworksManager.Start(); // } // catch (Exception e) // { // MessageBox.Show(e.Message, Application.ProductName); // } }