Наследование: MonoBehaviour
Пример #1
0
 void OnLevelWasLoaded(int level)
 {
     if (level == 0)
     {
         showPanels = GameObject.Find("UIstart").GetComponent <ShowPanels>();
     }
 }
Пример #2
0
	private ShowPanels showPanels;										//Reference to ShowPanels script on UI GameObject, to show and hide panels
	
	private void Awake() {
		//Get a reference to ShowPanels attached to UI object
		showPanels = GetComponent<ShowPanels> ();

		//Get a reference to PlayMusic attached to UI object
		playMusic = GetComponent<PlayMusic> ();
	}
Пример #3
0
//	public float TriggerFadeColorAnim
//	{
//		get {
//			animColorFade.SetTrigger("fade");
//			return fadeColorAnimationClip.length;
//		}
//	}

    public void Awake()
    {
        // Get a reference to ShowPanels attached to UI object
        showPanels = GetComponent <ShowPanels>();
        // Get a reference to PlayMusic attached to UI object
        playMusic = GetComponent <PlayMusic>();
    }
Пример #4
0
    void Countdown()
    {
        scene = SceneManager.GetActiveScene();

        if (scene.name.ToString() == "StartScreen")
        {
            countdown = 60;
        }
        else
        {
            if (countdown > 0 && Time.timeScale == 1)
            {
                countdown -= Time.deltaTime;
                Debug.Log("counting");
            }
            else if (countdown <= 0)
            {
                Debug.Log("GameOver");

                showPanel = FindObjectOfType <ShowPanels>();
                //Debug.Log(showPanel.name);
                showPanel.showGameOverPanel();
                playerControl.canControl = false;
            }
        }
    }
Пример #5
0
    public static StartOptions instance = null;                  //Static instance of GameManager which allows it to be accessed by any other script.

    //Awake is always called before any Start functions
    void Awake()
    {
        //Check if instance already exists
        if (instance == null)
        {
            //if not, set instance to this
            instance = this;
        }

        //If instance already exists and it's not this:
        else if (instance != this)
        {
            //Then destroy this. This enforces our singleton pattern, meaning there can only ever be one instance of a GameManager.
            Destroy(gameObject);
        }

        //Sets this to not be destroyed when reloading scene
        DontDestroyOnLoad(gameObject);


        //Get a reference to ShowPanels attached to UI object
        showPanels = GetComponent <ShowPanels> ();

        //Get a reference to PlayMusic attached to UI object
        playMusic = GetComponent <PlayMusic> ();

        //Get a reference to the CanvasGroup attached to the main menu so that we can fade it's alpha
        menuCanvasGroup = GetComponent <CanvasGroup>();

        fadeImage.color = menuSettingsData.sceneChangeFadeColor;
    }
Пример #6
0
 //Awake is called before Start()
 void Awake()
 {
     //Get a component reference to ShowPanels attached to this object, store in showPanels variable
     showPanels = GetComponent<ShowPanels> ();
     //Get a component reference attached to this object, store in mainMenu variable
     mainMenu = GetComponent<Manager_MainMenu>();
 }
    void Awake()
    {
        //Get a reference to ShowPanels attached to UI object
        showPanels = GetComponent <ShowPanels> ();

        //Get a reference to PlayMusic attached to UI object
        playMusic = GetComponent <PlayMusic> ();

        playMusic = GetComponent <PlayMusic> ();

        //setup ChilliConnect SDK with game token and verbose logging
        chilliConnect       = new ChilliConnectSdk(GAME_TOKEN, true);
        ChilliConnectId     = PlayerPrefs.GetString("ChilliConnectId");
        ChilliConnectSecret = PlayerPrefs.GetString("ChilliConnectSecret");
        UnityEngine.Debug.Log("Loaded from PlayerPrefs ChilliconnectId: " + ChilliConnectId + " ChilliConnectSecret: " + ChilliConnectSecret);

        //if player not created
        if (ChilliConnectId.Length == 0)
        {
            CreateAndLoginPlayer();
        }
        else
        {
            LoginPlayer();
        }
    }
Пример #8
0
    void Start()
    {
        timer = transform.GetComponentInChildren <TimerBehaviour> ();
        timer.SetAllottedTime(startingTime);
        levelUIShowPanels = GameObject.Find("UI").GetComponent <ShowPanels>();
//		Debug.LogError (timer.allottedTime);
    }
Пример #9
0
    public void Awake()
    {
        // Get a component reference to ShowPanel.
        m_ShowPanels = GameObject.Find("Canvas").GetComponent <ShowPanels>();
        // Get a component reference to AudioSource.
        m_SoundFx = GameObject.Find("Canvas/SoundFx").GetComponent <AudioSource>();
        // Get all receivers.
        m_Receivers = transform.GetComponentsInChildren <Receiver>();
        // Get all emitters.
        m_Emitters = transform.GetComponentsInChildren <Emitter>();

        m_ReceiversPos = new Vector3[m_Receivers.Length];
        m_ReceiversRot = new Quaternion[m_Receivers.Length];
        for (int i = 0; i < m_Receivers.Length; i++)
        {
            m_ReceiversPos[i] = m_Receivers[i].transform.position;
            m_ReceiversRot[i] = m_Receivers[i].transform.rotation;
        }

        m_EmittersPos = new Vector3[m_Emitters.Length];
        for (int i = 0; i < m_Emitters.Length; i++)
        {
            m_EmittersPos[i] = m_Emitters[i].transform.position;
        }
    }
Пример #10
0
 void Awake()
 {
     //Get a component reference to ShowPanels attached to this object, store in showPanels variable
     showPanels   = GetComponent <ShowPanels> ();
     anim         = GetComponent <Animator>();
     startOptions = GetComponent <StartOptions>();
 }
Пример #11
0
 //Awake is called before Start()
 void Awake()
 {
     //Get a component reference to ShowPanels attached to this object, store in showPanels variable
     showPanels = GetComponent<ShowPanels>();
     //Get a component reference to StartButton attached to this object, store in startScript variable
     startScript = GetComponent<StartOptions>();
 }
Пример #12
0
 //Awake is called before Start()
 void Awake()
 {
     //Get a component reference to ShowPanels attached to this object, store in showPanels variable
     showPanels = GetComponent <ShowPanels> ();
     //Get a component reference to StartButton attached to this object, store in startScript variable
     startScript = GetComponent <StartOptions> ();
 }
Пример #13
0
    public void Start()
    {
        AudioSource[] audios = GetComponents <AudioSource>();

        audio = audios[0];
        music = audios[1];

        audio.outputAudioMixerGroup.audioMixer.SetFloat("volume", PlayerPrefs.GetFloat("sfxVol"));
        music.outputAudioMixerGroup.audioMixer.SetFloat("volume", PlayerPrefs.GetFloat("musicVol"));

        projectHandler.ins.onDataReady += finishInit;


        //use an event to change music after pdata is loaded?
        MenuManager.ins = returnInstance();
        panels          = gameObject.GetComponent <ShowPanels>();

        #if UNITY_ANDROID
        //googlePlay = GameObject.Find("UI").GetComponent<gplayInteractor>();
#endif
        setVolume();

        currentPanel = "MenuPanel";
        if (pausePanel != null)
        {
            pausePanelName = pausePanel.name;
        }
    }
Пример #14
0
 public void HideDelayed()
 {
     //changed this during migration of functions, if performance issues become problematic, revisit this=====================
     showPanels = FindObjectOfType <ShowPanels>();
     //Hide the main menu UI element after fading out menu for start game in scene
     showPanels.HideMenu();
 }
	private ShowPanels showPanels;										//Reference to ShowPanels script on UI GameObject, to show and hide panels

	
	void Awake()
	{
		//Get a reference to ShowPanels attached to UI object
	    this.showPanels = this.GetComponent<ShowPanels> ();

		//Get a reference to PlayMusic attached to UI object
	    this.playMusic = this.GetComponent<PlayMusic> ();
	}
Пример #16
0
    void Awake()
    {
        showPanels = GetComponent <ShowPanels>();

        playMusic = GetComponent <PlayMusic>();

        start = GameObject.FindWithTag("Start");
    }
Пример #17
0
 // Awake is called before Start()
 private void Awake()
 {
     menu           = GameObject.Find("Menu UI");
     pause          = menu.GetComponent <Pause>();
     startScript    = menu.GetComponent <StartOptions>();
     showPanels     = menu.GetComponent <ShowPanels>();
     Time.timeScale = 0;
 }
Пример #18
0
 private void InitializeMenuAndPauseGameplay()
 {
     _showPanels = GetComponent <ShowPanels>();
     PauseScript = GetComponent <Pause>();
     _playMusic  = GetComponent <PlayMusic>();
     SetUnscaleUiAnimatorUpdateMode();
     PauseScript.DoPause();
 }
Пример #19
0
    void Awake()
    {
        //Get a reference to ShowPanels attached to UI object
        showPanels = GetComponent<ShowPanels>();

        //Get a reference to PlayMusic attached to UI object
        audioMixer = GetComponent<Manager_AudioMixer>();
    }
Пример #20
0
    private StartOptions startScript;                                           //Reference to the StartButton script

    //Awake is called before Start()
    void Awake()
    {
        //Get a component reference to ShowPanels attached to this object, store in showPanels variable
        //i'm making a new adjustment since I moved Pause.cs from UI to Game Manager. ======================================================================================================
        showPanels = FindObjectOfType <ShowPanels>();
        //Get a component reference to StartButton attached to this object, store in startScript variable
        startScript = GetComponent <StartOptions> ();
    }
Пример #21
0
    // Use this for initialization
    void Start () {

        mySprites = (Sprite[])Resources.LoadAll<Sprite>("worldsprites");
        showPanels = GetComponent<ShowPanels>();
        startoptions = GetComponent<StartOptions>();


    }
Пример #22
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.tag == "Player")
     {
         showPanel = FindObjectOfType <ShowPanels>();
         showPanel.showGameOverPanel();
     }
 }
Пример #23
0
 public void Start()
 {
     if (instance == null)
     {
         instance = this;
     }
     SetSelection(menuPanel);
 }
Пример #24
0
 // Use this for initialization
 void Start()
 {
     showPanels = GameObjectsManager.UI.GetComponent<ShowPanels> ();
     showPanels.ShowTimer ();
     timer = showPanels.timer;
     timerText = timer.GetComponent<Text> ();
     endTimer = false;
 }
Пример #25
0
    void Awake()
    {
        //Get a reference to ShowPanels attached to UI object
        showPanels = GetComponent <ShowPanels> ();

        //Get a reference to PlayMusic attached to UI object
        playMusic  = GetComponent <PlayMusic> ();
        cameraAnim = Camera.main.GetComponent <Animator> ();
    }
Пример #26
0
    //Awake is called before Start()

    void Awake()
    {
        //Get a component reference to ShowPanels attached to this object, store in showPanels variable
        showPanels = GetComponent <ShowPanels> ();
        //Get a component reference to StartButton attached to this object, store in startScript variable
        startScript = GetComponent <StartOptions> ();

        hudCanvas = GameObject.FindGameObjectWithTag("HUD");
    }
Пример #27
0
    private ShowPanels showPanels;                                                                              //Reference to ShowPanels script on UI GameObject, to show and hide panels


    void Awake()
    {
        //Get a reference to ShowPanels attached to UI object
        //changed this during migration of functions, if performance issues become problematic, revisit this
        showPanels = FindObjectOfType <ShowPanels> ();

        //Get a reference to PlayMusic attached to UI object
        playMusic = GetComponent <PlayMusic> ();
    }
Пример #28
0
    void Awake()
    {
        //Get a reference to ShowPanels attached to UI object
        showPanels = GetComponent <ShowPanels> ();

        Text txtMsg = GameObject.Find("Ganador").GetComponent <Text>();

        txtMsg.text = "El ganador es " + part.getJugGana();
    }
Пример #29
0
        private ShowPanels showPanels;                                      //Reference to ShowPanels script on UI GameObject, to show and hide panels


        void Awake()
        {
            //Get a reference to ShowPanels attached to UI object
            showPanels = GetComponent <ShowPanels>();
            //Check if a GameManager has already been assigned to static variable GameManager.instance or if it's still null


            //Get a reference to PlayMusic attached to UI object
            playMusic = GetComponent <PlayMusic>();
        }
Пример #30
0
    void Awake()
    {
        //Get a reference to ShowPanels attached to UI object
        showPanels = GetComponent <ShowPanels> ();

        //Get a reference to PlayMusic attached to UI object
        playMusic = GetComponent <PlayMusic> ();

        gameManager = GameObject.Find("GameManager").GetComponent <GameManager>();
    }
Пример #31
0
    void Awake()
    {
        showPanels = GetComponent <ShowPanels>();
        playMusic  = GetComponent <PlayMusic> ();

        loader = GameObject.FindWithTag("Player").GetComponent <LoadChunks>();

        inputRect             = input.GetComponent <RectTransform>();
        progressBar.sizeDelta = new Vector2(0, progressBar.sizeDelta.y);
    }
Пример #32
0
    private ShowPanels showPanels;                                                                              //Reference to ShowPanels script on UI GameObject, to show and hide panels


    void Awake()
    {
        //Get a reference to ShowPanels attached to UI object
        showPanels = GetComponent <ShowPanels> ();

        //Get a reference to PlayMusic attached to UI object
        playMusic = GetComponent <PlayMusic> ();

        changeScenes = true;
    }
Пример #33
0
    /// <summary>
    /// Standard awake
    /// </summary>
    void Awake()
    {
        _showPanels = GetComponent <ShowPanels> ();

        _playMusic = GetComponent <PlayMusic> ();

#if UNITY_ANDROID || UNITY_IOS
        Screen.sleepTimeout = SleepTimeout.NeverSleep;
#endif
    }
Пример #34
0
 //Awake is called before Start()
 void Awake()
 {
     UI = GameObject.Find("UI");
     //Get a component reference to ShowPanels attached to this object, store in showPanels variable
     showPanels = UI.GetComponent <ShowPanels> ();
     //Get a component reference to StartButton attached to this object, store in startScript variable
     startScript = UI.GetComponent <StartOptions> ();
     pausebttn   = GetComponent <Button>();
     pausebttn.onClick.AddListener(Clicked);
 }
Пример #35
0
    private void InitializeMenuAndPauseGameplay()
    {
        _showPanels = GetComponent <ShowPanels>();
        PauseScript = GetComponent <Pause>();
        _playMusic  = GetComponent <PlayMusic>();
        _player     = GameObject.FindGameObjectWithTag("Player");

        SetPlayerState(false);
        SetUnscaleUiAnimatorUpdateMode();
        PauseScript.DoPause();
    }
Пример #36
0
    public void ReturnToMenu()
    {
        showPanels = GetComponent <ShowPanels>();
        ui         = GetComponent <StartOptions>();
        showPanels.HidePausePanel();
        showPanels.ShowMenu();
        ui.changeScenes = false;
        ui.inMainMenu   = true;

        SceneManager.LoadScene(0);
    }
Пример #37
0
    void Awake()
    {
        //Get a reference to ShowPanels attached to UI object
        showPanels = GetComponent<ShowPanels>();

        //Get a reference to PlayMusic attached to UI object
        playMusic = GetComponent<PlayMusic>();

        //Set the server Address
        //messageBox = GetComponent<Text>();
    }
Пример #38
0
    void Awake()
    {
        startOp    = FindObjectOfType <StartOptions>();
        quitApp    = FindObjectOfType <QuitApplication>();
        pause      = FindObjectOfType <Pause>();
        showPanels = FindObjectOfType <ShowPanels>();

        selection = startSelect % hands.Count;

        Cursor.lockState = CursorLockMode.Locked;
    }
Пример #39
0
	void Awake()
	{
		//Get a reference to ShowPanels attached to UI object
		showPanels = GetComponent<ShowPanels> ();
        ui = GameObject.Find("UI");

		//Get a reference to PlayMusic attached to UI object
		playMusic = GetComponent<PlayMusic> ();

        // Make time run normally
        Time.timeScale = 1;
	}
Пример #40
0
 private void Awake()
 {
     theTransform = transform;
     anim = GetComponent<Animator>();
     playerH = GetComponent<PlayerHealth>();
     rigid = GetComponent<Rigidbody2D>();
     positions = GameObject.FindWithTag("Scripts").GetComponent<Positions>();
     reset = GameObject.FindWithTag("Scripts").GetComponent<Reset>();
     enemies = GameObject.FindGameObjectsWithTag("Enemy");
     tips = GameObject.FindWithTag("UI").GetComponent<HelpfulTips>();
     showPanels = GameObject.FindWithTag("UI").GetComponent<ShowPanels>();
     scenes = GameObject.FindWithTag("Scripts").GetComponent<Scenes>();
     if (!isRight)
         reset.ResetHelmet();
     rigid.gravityScale = 0f;
     GetComponentInChildren<SpriteRenderer>().enabled = false;
 }
Пример #41
0
    void Awake()
    {
        //Get a reference to ShowPanels attached to UI object
        showPanels = GetComponent<ShowPanels> ();

        //Get a reference to PlayMusic attached to UI object

        //		//
        //		playMusic = GetComponent<PlayMusic> ();

        if(SceneManager.GetActiveScene().buildIndex!=0){

            inMainMenu = false;
        }

        //
    }
Пример #42
0
    /// <summary>
    /// Chamada quando uma cena e carregada
    /// Nota: Esta funcao e chamada pelo Awake e OnLevelWasLoaded,
    /// e nao faz parte do Unity
    /// </summary>
    void OnLevelLoad()
    {
        // Gera uma nova UI, isso deve acontecer no menu principal
        if (showPanels == null) {
            GameObject ui = GameObject.Instantiate(UIPrefab);
            showPanels = ui.GetComponent<ShowPanels>();
            showPanels.ShowMenu();
        }

        // Atualiza qual fase o jogo esta
        currentLevel = GetLevelEnum ();
        if (currentLevel != Constants.Levels.None) {
            // retorna NULL se nao achou nada com a TAG
            GameObject[] pickUps = GameObject.FindGameObjectsWithTag (Constants.Tags.PickUps) as GameObject[];
            pickUpsTotal = pickUps.Length; //conta o total de pickups na fase, de acordo com o vetor pickUps
            if (pickUps == null || pickUps.Length == 0) {
                Debug.LogWarning ("Nenhum pickup encontrado");
                return;
            }

            pickUpsTotal = pickUps.Length;
            gameTime = 0;
            score = 0;

            pickUpsGet = 0;

            // Ativa o HUD
            showPanels.ShowGameScreen ();

            // Inicializa um relogio interno
            InvokeRepeating ("GameTimer", 0f, 1f);
        } else {
            // confirma que o HUD esta desativado
            showPanels.HideGameScreen();
        }

        count = 0;
        Instance = this;
    }
Пример #43
0
        private void SetPanel(ShowPanels panelType, object dataObject)
        {
            this.gbSelectedData.SuspendLayout();

            this.SetModifyButtons(true);
            this.btnDetailsUnpack.Enabled = true;
            // -----------------
            this.pnUopfile.Visible = this.pnUopfile.Enabled = false;
            this.pnUopDatafile.Visible = this.pnUopDatafile.Enabled = false;
            this.pnUopHeaderAndData.Visible = this.pnUopHeaderAndData.Enabled = false;
            // -----------------
            this.gbSelectedData.Tag = dataObject;

            switch (panelType)
            {
                case ShowPanels.RootNode:
                {
                    UOPFile uppeCurrent = (UOPFile) this.gbSelectedData.Tag;
                    this.txt_pnlUopFile_Header1.Text = Utility.ByteArrayToString(uppeCurrent.m_Header.m_variousData, Utility.HashStringStyle.HexWithSeparator);
                    this.num_pnlUopFile_Files.Value = uppeCurrent.m_Header.m_totalIndex;
                    this.txt_pnlUopFile_Header2.Text = Utility.ByteArrayToString(uppeCurrent.m_Header.m_Unknown, Utility.HashStringStyle.HexWithSeparator);

                    this.pnUopfile.Visible = true;
                } break;

                case ShowPanels.DataNode:
                {
                    UOPIndexBlockHeader upCurrent = (UOPIndexBlockHeader)this.gbSelectedData.Tag;
                    this.txt_pnUopDatafile_Offset.Text = String.Format("{0:X}", upCurrent.m_OffsetNextIndex);
                    this.nud_pnUopDatafile_Files.Value = upCurrent.FilesDynamicCount;

                    this.pnUopDatafile.Visible = true;
                } break;

                case ShowPanels.SingleHeader:
                {
                    UOPPairData upCurrent = (UOPPairData)this.gbSelectedData.Tag;
                    // Header block
                    this.txt_pnUopHeaderAndData_Offset.Text = String.Format("{0:X}", upCurrent.First.m_OffsetOfDataBlock);
                    this.txt_pnUopHeaderAndData_SizeHeader.Text = upCurrent.First.m_SizeofDataHeaders.ToString();
                    this.txt_pnUopHeaderAndData_Unk1.Text = String.Format("{0:X}", upCurrent.First.m_Unknown1);
                    this.txt_pnUopHeaderAndData_Unk2.Text = String.Format("{0:X}", upCurrent.First.m_Unknown2);
                    this.txt_pnUopHeaderAndData_Unk3.Text = String.Format("{0:X}", upCurrent.First.m_Unknown3);
                    this.chk_pnUopHeaderAndData_Compressed.Checked = upCurrent.First.IsCompressed;
                    // Data block
                    byte[] bData = new byte[10]; Array.Copy(upCurrent.Second.m_CompressedData, bData, Math.Min(10, upCurrent.Second.m_CompressedData.Length));
                    this.txt_pnUopHeaderAndData_Data.Text = Utility.ByteArrayToString(bData, Utility.HashStringStyle.HexWithSeparator) + " ...";
                    this.txt_pnUopHeaderAndData_DataFlags.Text = String.Format("{0:X}", upCurrent.Second.m_DataFlag);
                    this.txt_pnUopHeaderAndData_DataLocalOffset.Text = String.Format("{0:X}", upCurrent.Second.m_LocalOffsetToData);
                    this.txt_pnUopHeaderAndData_DataUnk1.Text = String.Format("{0:X}", upCurrent.Second.m_Unknown);
                    this.lbl_pnUopHeaderAndData_SizeC.Text = String.Format("Compressed: {0}", Utility.StringFileSize(upCurrent.First.m_LenghtCompressed));
                    this.lbl_pnUopHeaderAndData_SizeU.Text = String.Format("Uncompressed: {0}", Utility.StringFileSize(upCurrent.First.m_LenghtUncompressed));

                    this.pnUopHeaderAndData.Visible = true;
                } break;

                case ShowPanels.Nothing:
                {

                } break;
            }

            this.gbSelectedData.ResumeLayout(true);
        }
Пример #44
0
        private void CommonDump(ShowPanels spType, object oCast)
        {
            if (DoingSomeJob.Working)
            {
                MessageBox.Show("Please wait... Still working in background!", "UO:KR Uop Dumper", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                ThreadArgs.MyThreadDelegate mtdParse = delegate(object args)
                {
                    ThreadArgs theArgs = (ThreadArgs)args;
                    StupidInterface theForm = (StupidInterface)theArgs.Args[0];
                    string thePath = (string)theArgs.Args[1];
                    ShowPanels theType = (ShowPanels)theArgs.Args[2];
                    object theObject = theArgs.Args[3];

                    UopManager upIstance = UopManager.getIstance();
                    string baseName = Path.GetFileNameWithoutExtension(upIstance.UopPath);
                    string resultName = "";

                    try
                    {
                        if (!Directory.Exists(thePath))
                            Directory.CreateDirectory(thePath);

                        int i = 0, j = 0;

                        switch (spType)
                        {
                            case ShowPanels.RootNode:
                            {
                                UOPFile toDump = (UOPFile)theObject;
                                foreach (UOPIndexBlockHeader dumpTemp1 in toDump.m_Content)
                                {
                                    foreach (UOPPairData dumpTemp2 in dumpTemp1.m_ListData)
                                    {
                                        using (FileStream fsWrite = File.Create(thePath + @"\" + String.Format(StaticData.UNPACK_NAMEPATTERN, baseName, i, j, dumpTemp2.First.IsCompressed ? StaticData.UNPACK_EXT_COMP : StaticData.UNPACK_EXT_UCOMP)))
                                        {
                                            using (BinaryWriter bwWrite = new BinaryWriter(fsWrite))
                                            {
                                                bwWrite.Write(dumpTemp2.Second.Extract(dumpTemp2.First.IsCompressed, dumpTemp2.First.m_LenghtUncompressed));
                                            }
                                        }

                                        j++;
                                    }

                                    i++;
                                    j = 0;
                                }

                                resultName = "the UOP file.";
                            } break;

                            case ShowPanels.DataNode:
                            {
                                UOPIndexBlockHeader toDump = (UOPIndexBlockHeader)theObject;
                                foreach (UOPIndexBlockHeader dumpTemp1 in upIstance.UopFile.m_Content)
                                {
                                    if (dumpTemp1.Equals(toDump))
                                        break;

                                    i++;
                                }

                                foreach (UOPPairData dumpTemp2 in toDump.m_ListData)
                                {
                                    using (FileStream fsWrite = File.Create(thePath + @"\" + String.Format(StaticData.UNPACK_NAMEPATTERN, baseName, i, j, dumpTemp2.First.IsCompressed ? StaticData.UNPACK_EXT_COMP : StaticData.UNPACK_EXT_UCOMP)))
                                    {
                                        using (BinaryWriter bwWrite = new BinaryWriter(fsWrite))
                                        {
                                            bwWrite.Write(dumpTemp2.Second.Extract(dumpTemp2.First.IsCompressed, dumpTemp2.First.m_LenghtUncompressed));
                                        }
                                    }

                                    j++;
                                }

                                resultName = "the Header Block " + i.ToString() + ".";
                            } break;

                            case ShowPanels.SingleHeader:
                            {
                                UOPPairData toDump = (UOPPairData)theObject; bool bBreakLoop = false;
                                foreach (UOPIndexBlockHeader dumpTemp1 in upIstance.UopFile.m_Content)
                                {
                                    foreach (UOPPairData dumpTemp2 in dumpTemp1.m_ListData)
                                    {
                                        bBreakLoop = dumpTemp2.Equals(toDump);
                                        if (bBreakLoop)
                                            break;

                                        j++;
                                    }

                                    if (bBreakLoop)
                                        break;

                                    i++;
                                    j = 0;
                                }

                                using (FileStream fsWrite = File.Create(thePath + @"\" + String.Format(StaticData.UNPACK_NAMEPATTERN, baseName, i, j, toDump.First.IsCompressed ? StaticData.UNPACK_EXT_COMP : StaticData.UNPACK_EXT_UCOMP)))
                                {
                                    using (BinaryWriter bwWrite = new BinaryWriter(fsWrite))
                                    {
                                        bwWrite.Write(toDump.Second.Extract(toDump.First.IsCompressed, toDump.First.m_LenghtUncompressed));
                                    }
                                }

                                resultName = "the Index " + j.ToString() + ".";
                            } break;
                        }

                        GC.Collect();
                        theForm.SetTextArea("Completed unpacking for " + resultName);
                    }
                    catch
                    {
                        theForm.SetTextArea("ERROR while unpacking selected data.");
                    }
                    finally
                    {
                        theForm.DisableOtherIcon(false);
                        theForm.SetLoadIcon(true);
                        DoingSomeJob.Working = false;
                    }
                };

                DoingSomeJob.Working = true;
                SetTextArea("Unpacking seleceted data to \"" + Application.StartupPath + StaticData.UNPACK_DIR + "\" ...");
                this.SetDisableIcon(true);
                this.SetLoadIcon(false);

                System.Threading.Thread tRun = new System.Threading.Thread(new System.Threading.ParameterizedThreadStart(mtdParse));
                tRun.Start(new ThreadArgs(new object[] { this, Application.StartupPath + StaticData.UNPACK_DIR, spType, oCast }));
            }
        }
Пример #45
0
 void Awake()
 {
     controller = GetComponent<ScoreController> ();
     showPanels = GetComponent<ShowPanels> ();
     rank = new List<int>(new int[] {0, 0, 0});
 }
Пример #46
0
 // Use this for initialization
 void Start()
 {
     showPanelsController = GameObject.FindGameObjectWithTag("UIManagerObject").GetComponent<ShowPanels>();
 }
Пример #47
0
 void Awake()
 {
     //Get a reference to ShowPanels attached to UI object
     showPanels = GetComponent<ShowPanels> ();
 }
Пример #48
0
    void Awake()
    {
        /*uisys = GameObject.FindGameObjectsWithTag("UI");
        if (uisys.Length != 1) {
            Destroy (gameObject);
        }*/

        //Get a reference to ShowPanels attached to UI object
        showPanels = GetComponent<ShowPanels> ();

        //Get a reference to PlayMusic attached to UI object
        playMusic = GetComponent<PlayMusic> ();
    }
Пример #49
0
    // Use this for initialization
    void Start () {
        showPanels = GetComponent<ShowPanels>();

    }
Пример #50
0
 void Start()
 {
     towerSpots = GameObjectsManager.towerSpots;//GameObject.FindGameObjectWithTag ("Tower spots");
     towerController = tower.GetComponent<TowerController>();
     gameManager = GetComponent<GameManager>();
     spots = EnemySpawner.GetChildren (towerSpots);
     showPanels = GameObjectsManager.UI.GetComponent<ShowPanels> ();
     //addPanel = showPanels.addPanel;
     //upgradePanel = showPanels.upgradePanel;
 }
 void Awake()
 {
     //		materialRenderer = GetComponent<Renderer>();
     showPanelsController = GameObject.FindGameObjectWithTag("UIManagerObject").GetComponent<ShowPanels>();
 }
Пример #52
0
 private void Awake()
 {
     showPanels = GetComponent<ShowPanels>();
     startScript = GetComponent<StartOptions>();
 }
Пример #53
0
    void Awake()
    {
        //Get a reference to ShowPanels attached to UI object
        showPanels = GetComponent<ShowPanels> ();

        //Get a reference to PlayMusic attached to UI object
        playMusic = GetComponent<PlayMusic> ();

        leftCurtain  = GameObject.Find("left curtain").transform;
        rightCurtain = GameObject.Find("right curtain").transform;
        leftCurtainTarget  = leftCurtain.transform.position;
        rightCurtainTarget = rightCurtain.transform.position;
        leftCurtainTarget.x  = -target;
        rightCurtainTarget.x = target;
    }
Пример #54
0
    void Awake()
    {
        //Get a reference to ShowPanels attached to UI object
        showPanels = GetComponent<ShowPanels> ();

        //Get a reference to PlayMusic attached to UI object
        playMusic = GetComponent<PlayMusic> ();

        dontDestroy = GetComponent<DontDestroy> ();

        //Check if there is an existing instance of this object
        if((instance) && (instance.GetInstanceID() != GetInstanceID()))
            DestroyImmediate(gameObject); //Delete duplicate
        else
        {
            instance = this; //Make this object the only instance
            DontDestroyOnLoad (gameObject); //Set as do not destroy
        }
    }
Пример #55
0
 void Awake()
 {
     showPanels = GetComponent<ShowPanels>();
 }