예제 #1
0
 public void Start()
 {
     singleton       = this;
     canvas          = GameObject.Find("Canvas");
     sr              = GameObject.Find("EnemyScroll").GetComponent <ScrollRect>();
     eic             = GameObject.Find("EnemyContent").GetComponent <EnemyInvController>();
     btc             = GameObject.Find("BossButton").GetComponent <BossTabController>();
     pointText       = GameObject.Find("Points").transform.Find("Text").GetComponent <Text>();
     wavenumber      = GameObject.Find("WaveNumber").transform.Find("Text").GetComponent <Text>();
     wavenumber.text = "" + 1;
     EventManager.Instance().RegisterForEventType("mouse_release", this);
     EventManager.Instance().RegisterForEventType("wave_editor_changed", this);
     zonepanels      = new ZonePanelController[6];
     zonelists       = new List <EnemyListEntryController> [6];
     activeWaveFrame = GameObject.Find("WaveFrame1").GetComponent <WaveFrameController>();
     for (int i = 0; i < 6; i++)
     {
         zonepanels[i] = activeWaveFrame.zonepanels[i];
         zonelists[i]  = activeWaveFrame.zonelists[i];
     }
     frames    = new WaveFrameController[6];
     frames[0] = activeWaveFrame;
     for (int i = 2; i < 7; i++)
     {
         frames[i - 1] = GameObject.Find("WaveFrame" + i).GetComponent <WaveFrameController>();
     }
 }
예제 #2
0
    public void SetActiveFrame(int frameID)
    {
        activeWaveFrame = frames[frameID];
        for (int i = 0; i < 6; i++)
        {
            zonepanels[i] = activeWaveFrame.zonepanels[i];
            zonelists[i]  = activeWaveFrame.zonelists[i];
        }
        wavenumber.text = "" + (frameID + 1);
        GameEvent ge = new GameEvent("wave_editor_changed");

        EventManager.Instance().RaiseEvent(ge);
    }
예제 #3
0
 public void Start()
 {
     singleton = this;
     canvas = GameObject.Find("Canvas");
     sr = GameObject.Find("EnemyScroll").GetComponent<ScrollRect>();
     btc = GameObject.Find ("BossButton").GetComponent<BossTabController>();
     pointText = GameObject.Find ("Points").transform.FindChild("Text").GetComponent<Text>();
     wavenumber = GameObject.Find ("WaveNumber").transform.FindChild("Text").GetComponent<Text>();
     wavenumber.text = ""+1;
     EventManager.Instance().RegisterForEventType("mouse_release",this);
     EventManager.Instance().RegisterForEventType("wave_editor_changed",this);
     zonepanels = new ZonePanelController[6];
     zonelists = new List<EnemyListEntryController>[6];
     activeWaveFrame = GameObject.Find ("WaveFrame1").GetComponent<WaveFrameController>();
     for(int i = 0; i < 6; i++){
         zonepanels[i] = activeWaveFrame.zonepanels[i];
         zonelists[i] = activeWaveFrame.zonelists[i];
     }
     frames = new WaveFrameController[6];
     frames[0] = activeWaveFrame;
     for(int i = 2; i < 7; i++){
         frames[i-1] = GameObject.Find ("WaveFrame" + i).GetComponent<WaveFrameController>();
     }
 }
예제 #4
0
 public void SetActiveFrame(int frameID)
 {
     activeWaveFrame = frames[frameID];
     for(int i = 0; i < 6; i++){
         zonepanels[i] = activeWaveFrame.zonepanels[i];
         zonelists[i] = activeWaveFrame.zonelists[i];
     }
     wavenumber.text = ""+(frameID+1);
     GameEvent ge = new GameEvent("wave_editor_changed");
     EventManager.Instance().RaiseEvent(ge);
 }