public HQ() { ControlCenter = new MainBase(); Wall = new Wall(); Fields = new Fields(); Barracks = new Barracks(); }
void Start () { scoreBox = GetComponent <Text> (); currentScore = 0; scoreBox.text = "People Evacuated: " + currentScore; mainBase = FindObjectOfType<MainBase>(); PlayerPrefs.SetInt ("Score", 0); }
public static void pageDirects(string page) { if (!Form1.Instance.PnlContainer.Controls.ContainsKey(page)) { Form1.Instance.PnlContainer.Controls.Clear(); if ("AddWord" == page) { AddWord aw = new AddWord(); aw.Dock = DockStyle.Fill; Form1.Instance.PnlContainer.Controls.Add(aw); } if ("MainBase" == page) { MainBase mb = new MainBase(); mb.Dock = DockStyle.Fill; Form1.Instance.PnlContainer.Controls.Add(mb); } if ("LearnWord" == page) { LearnWord ln = new LearnWord(); ln.Dock = DockStyle.Fill; Form1.Instance.PnlContainer.Controls.Add(ln); } if ("Search" == page) { Search sa = new Search(); sa.Dock = DockStyle.Fill; Form1.Instance.PnlContainer.Controls.Add(sa); } if ("TabSignUp" == page) { TabSignUp su = new TabSignUp(); su.Dock = DockStyle.Fill; Form1.Instance.PnlContainer.Controls.Add(su); } if ("TabSign" == page) { TabSign si = new TabSign(); si.Dock = DockStyle.Fill; Form1.Instance.PnlContainer.Controls.Add(si); } if ("QuizPage" == page) { QuizPage qp = new QuizPage(); qp.Dock = DockStyle.Fill; Form1.Instance.PnlContainer.Controls.Add(qp); } if ("Statistics" == page) { Statistics st = new Statistics(); st.Dock = DockStyle.Fill; Form1.Instance.PnlContainer.Controls.Add(st); } } Form1.Instance.PnlContainer.Controls[page].BringToFront(); }
void Awake() { navAgent = GetComponent <NavMeshAgent>(); enemyAnim = GetComponent <Animator>(); mainBase = GameObject.FindGameObjectWithTag("Base").GetComponent <MainBase>(); enemyTransform = transform; //assign the reference of Transform target = GameObject.FindGameObjectWithTag("Player").transform; targetBase = GameObject.FindGameObjectWithTag("Base").transform; audioListener = GameObject.FindGameObjectWithTag("FPSCamera").GetComponent <AudioListener>(); audioSource = GetComponent <AudioSource>(); }
public void BaseDestroyed(MainBase mainBase) { if (gameInitiated && mainBase.GetComponent <TeamData>().GetTeamBelonging() == Team.TeamRed) { // Game Lost GameLost(); } else if (gameInitiated && mainBase.GetComponent <TeamData>().GetTeamBelonging() == Team.TeamGreen) { GameWon(); } // Game over }
public static void pageDirects(string page) { if (!Form1.Instance.PnlContainer.Controls.ContainsKey(page)) { Form1.Instance.PnlContainer.Controls.Clear(); if ("QuestionOp" == page) { QuestionOp aw = new QuestionOp(); aw.Dock = DockStyle.Fill; Form1.Instance.PnlContainer.Controls.Add(aw); } if ("MainBase" == page) { MainBase mb = new MainBase(); mb.Dock = DockStyle.Fill; Form1.Instance.PnlContainer.Controls.Add(mb); } if ("TabSign" == page) { TabSign si = new TabSign(); si.Dock = DockStyle.Fill; Form1.Instance.PnlContainer.Controls.Add(si); } if ("QuizPage" == page) { QuizPage qp = new QuizPage(); qp.Dock = DockStyle.Fill; Form1.Instance.PnlContainer.Controls.Add(qp); } if ("Statistics" == page) { Statistics st = new Statistics(); st.Dock = DockStyle.Fill; Form1.Instance.PnlContainer.Controls.Add(st); } if ("adminPage" == page) { adminPage ap = new adminPage(); ap.Dock = DockStyle.Fill; Form1.Instance.PnlContainer.Controls.Add(ap); } } Form1.Instance.PnlContainer.Controls[page].BringToFront(); }
private void GoToEnemyBase() { GameObject enemy = ResourceManager.GetEnemyPlayerObject(Owner); MainBase enemyBase = enemy.transform.GetComponentInChildren <MainBase>(); if (enemyBase != null) { StartMove(enemyBase.transform.position); } else { WorldObject anyObject = enemy.transform.GetComponentInChildren <WorldObject>(); if (anyObject != null) { StartMove(anyObject.transform.position); } } }
private void Form1_Load(object sender, System.EventArgs e) { m_endogine = new EndogineHub(Application.ExecutablePath); string[] aAvailableStrategies = StageBase.GetAvailableRenderers(null); // string[] aAvailableStrategies = new string[]{Enum.GetName(typeof(EndogineHub.RenderStrategy), 0), Enum.GetName(typeof(EndogineHub.RenderStrategy), 1)}; if (Endogine.AppSettings.Instance.GetNodeText("MDI") != "false") { this.IsMdiContainer = true; } if (Endogine.AppSettings.Instance.GetNodeText("SetupDialog") != "false") { SetupWindow wndSetup = new SetupWindow(aAvailableStrategies, this); wndSetup.ShowDialog(); } m_formStage = new Main(); Form formMdiParent = (Form)null; if (this.IsMdiContainer) { this.Width = 800; this.Height = 600; this.WindowState = FormWindowState.Maximized; formMdiParent = this; m_formStage.MdiParent = this; } else { this.Visible = false; //TODO: this doesn't work this.Text = "Should be invisible!"; } //TODO: anyhow, it's strange to use a Form to start from, the project should probably be a console application. m_formStage.Show(); m_endogine.Init(m_formStage, formMdiParent, this); m_formStage.EndogineInitDone(); }