当前位置: 首页>>代码示例>>C#>>正文


C# GUIManager类代码示例

本文整理汇总了C#中GUIManager的典型用法代码示例。如果您正苦于以下问题:C# GUIManager类的具体用法?C# GUIManager怎么用?C# GUIManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GUIManager类属于命名空间,在下文中一共展示了GUIManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ShowWindow

	public static void ShowWindow()
	{
		//Show existing window instance. If one doesn't exist, make one.
		if ( GUIManager.GUIEditWindowSize.x != 0.0f && GUIManager.GUIEditWindowSize.y != 0.0f )
		{
			GetWindow<GUIManagerWindow>().minSize = GUIManager.GUIEditWindowSize;
			GetWindow<GUIManagerWindow>().maxSize = GUIManager.GUIEditWindowSize;
			EditorWindow.GetWindowWithRect(typeof(GUIManagerWindow),new Rect(0,0,GUIManager.GUIEditWindowSize.x,GUIManager.GUIEditWindowSize.y));
		}
		else
			EditorWindow.GetWindow(typeof(GUIManagerWindow));

		// get GUIManager
		if ( guiManager == null )
		{
			GameObject go = GameObject.Find ("GUIManager");
			if ( go != null )
			{
				guiManager = go.GetComponent<GUIManager>() as GUIManager;
				if ( guiManager != null )
				{
					guiManager.Fade = false;
				}
			}
		}
	}
开发者ID:MedStarSiTEL,项目名称:UnityTrauma,代码行数:26,代码来源:GUIManagerWindow.cs

示例2: Start

    private void Start()
    {
        // Get the transform of the main camera to allow for camera-relative controls
        if (Camera.main != null)
        {
            cam = Camera.main.transform;
        }
        else
        {
            Debug.LogWarning(
                "Warning: no main camera found. Third person character needs a Camera tagged \"MainCamera\", for camera-relative controls.");
        }

        // Initialize variables
        character = GetComponent<RobotCharacter>();
		ragdoll = GetComponent<RobotRagdoll>();
		particle = GetComponent<RobotParticleManager>();
		energy = GetComponent<RobotEnergy>();
		isoCam = Camera.main.GetComponent<IsometricCamera>();
		GM = GameObject.Find("GameManager").GetComponent<GameManager>();
		gui = GameObject.Find ("GUI").GetComponentInChildren<GUIManager>();
		entity = GetComponentInChildren<EntityRig>();
		crouch = false;
		guard = false;
		leftTriggerReleased = true;
		rightTriggerReleased = true;
		energy.StartEnergyDrain();
    }
开发者ID:zeroxiii,项目名称:CS6457_CS4455_Quicksilver_Project,代码行数:28,代码来源:RobotUserControl.cs

示例3: TextBoxView

 public TextBoxView(TextBox model, GUIManager manager)
     : base(model, manager)
 {
     m_CursorTimer = new Timer();
     m_CursorTimer.Elapsed += TimerElapsed;
     model.OnValueChanged += Model_OnValueChanged;
 }
开发者ID:FreeReign,项目名称:UltimaXNA,代码行数:7,代码来源:TextBoxView.cs

示例4: Awake

        void Awake()
        {
            IM = GameObject.FindGameObjectWithTag("InputManager").GetComponent<InputManager>();
            GM = GUIManager.Instance;
            EM = EventManager.Instance;

            camera.enabled = false;
            camera.rect = objectViewArea;

            // this box goes to GUIManager, who will render it behind the camera render, creating borders.
            showboxEdge = new Rect(objectViewArea.x * Screen.width - edgeStyleForShowbox.border.left,
                                   objectViewArea.y * Screen.height - edgeStyleForShowbox.border.top,
                                   objectViewArea.width * Screen.width + edgeStyleForShowbox.border.right*2,
                                   objectViewArea.height * Screen.height + edgeStyleForShowbox.border.bottom*2);

            textbox = ((GameObject)Instantiate(pagedTextPrefab)).GetComponent<PagedTextbox>();
            textbox.SetPosition(Screen.width*textboxViewArea.x, Screen.height*textboxViewArea.y);
            // textbox is a4 shaped now: setting x wont matter
            textbox.SetSize(Screen.height*textboxViewArea.height / Mathf.Sqrt(2), Screen.height*textboxViewArea.height);
            textbox.Show = false;

            closeButtonRect = new Rect(Screen.width - closeButton.width, 0, closeButton.width, closeButton.height);

            EM.ViewHistoricalObject += HandleViewHistoricalObject;
            EM.HideHistoricalObject += HandleHideHistoricalObject;
        }
开发者ID:soralapio,项目名称:turkubeforethegreatfire,代码行数:26,代码来源:ObjectViewerController.cs

示例5: Init

        public override void Init( GUIManager gui )
        {
            base.Init( gui );

            newGame.onClick.AddListener( OnNewGameButton );
            quit.onClick.AddListener( OnQuit );
        }
开发者ID:forwolk,项目名称:HamburgTest,代码行数:7,代码来源:MainMenu.cs

示例6: Awake

    public void Awake()
    {
        this.guiManager = (GUIManager) Camera.main.GetComponent("GUIManager");

        // Detect and parse any existing human units.

        GameObject[] humanUnitObjects = GameObject.FindGameObjectsWithTag(TagConstants.HUMANS);

        if (humanUnitObjects != null)
        {
            HumanUnit currentHumanUnit;

            for (int i = 0; i < humanUnitObjects.Length; i++)
            {
                currentHumanUnit = (HumanUnit) humanUnitObjects[i].GetComponent("HumanUnit");

                if (currentHumanUnit != null)
                {
                    this.humanUnits.Add(currentHumanUnit);
                }
                else
                {
                    Debug.LogError("Game Object " + humanUnitObjects[i].name + " is missing HumanUnit component.");
                }
            }
        }

        Debug.Log("Started with " + this.GetHumanCount() + " human units.");

        // Prevent units colliding with each other.
        int unitLayerMask = LayerMask.NameToLayer(LayerConstants.UNITS);
        Physics.IgnoreLayerCollision(unitLayerMask, unitLayerMask);
    }
开发者ID:kimsama,项目名称:Unity-Town,代码行数:33,代码来源:UnitManager.cs

示例7: Start

    // Use this for initialization
    void Start()
    {
        EM = EventManager.Instance;
        gm = GameObject.FindGameObjectWithTag("GUIManager").GetComponent<GUIManager>();

        float w = back.width/2;
        float h = back.height/2;
        backr = new Rect(Screen.width-w, 0-h*0.1f, w, h);

        w = scenes.width/2;
        h = scenes.height/2;
        scenesr = new Rect(Screen.width - backr.width / 2 - w / 2 + 3, backr.height*0.15f, w,h);

        w = texts.width/2;
        h = texts.height/2;
        textsr = new Rect(Screen.width - backr.width / 2 - w / 2 + 7, backr.height*0.455f, w,h);

        toggles = new Dictionary<IconTypes, bool>();
        toggles[IconTypes.Alueet] = true;
        toggles[IconTypes.Tarinat] = true;
        // dafug : really?
        iconnames = new Dictionary<IconTypes, string>();
        iconnames[IconTypes.Alueet] = "scene";
        iconnames[IconTypes.Tarinat] = "text";

        gm.NormalGUIFuncs += DrawMenu;
    }
开发者ID:soralapio,项目名称:turkubeforethegreatfire,代码行数:28,代码来源:SettingsGui.cs

示例8: Awake

 void Awake()
 {
     appManager = GetComponent<AppManager>();
     guiManager = GetComponent<GUIManager>();
     gameplayManager = GetComponent<GameplayManager>();
     soundManager = GetComponent<SoundManager>();
 }
开发者ID:ZacheryJohnson,项目名称:Gluten-Free-Boy,代码行数:7,代码来源:InputManager.cs

示例9: InitWaitModal

    public IEnumerator InitWaitModal( GUIManager.ModalType modalType, string strMessage, 
								float fDuration = 0.0f, System.Action waitCallBack = null )
    {
        this.modalType = modalType;

        this.fDuration = fDuration;
        this.fStartTime = Time.time;

        this.waitCallBack = waitCallBack;

        // set label
        if( messageLabel != null )
            messageLabel.text = strMessage;

        if( Time.time < fStartTime + fDuration ) {

            yield return null;
        }
        else {

            if( waitCallBack != null )
                waitCallBack();
        }

        GUIManager.Instance.modalDialogs.CurrentModal = null;
    }
开发者ID:chichikov,项目名称:chichikov76,代码行数:26,代码来源:UIModal.cs

示例10: Awake

	//setup
	void Awake()
	{
		gui = FindObjectOfType(typeof(GUIManager)) as GUIManager ;
		if(tag != "Coin")
		{
			tag = "Coin";
			Debug.LogWarning ("'Coin' script attached to object not tagged 'Coin', tag added automatically", transform);
		}
		GetComponent<Collider>().isTrigger = true;
		triggerParent = GetComponentInChildren<TriggerParent>();
		//if no trigger bounds are attached to coin, set them up
		if(!triggerParent)
		{
			GameObject bounds = new GameObject();
			bounds.name = "Bounds";
			bounds.AddComponent<SphereCollider>();
			bounds.GetComponent<SphereCollider>().radius = 7f;
			bounds.GetComponent<SphereCollider>().isTrigger = true;
			bounds.transform.parent = transform;
			bounds.transform.position = transform.position;
			bounds.AddComponent<TriggerParent>();
			triggerParent = GetComponentInChildren<TriggerParent>();
			triggerParent.tagsToCheck = new string[1];
			triggerParent.tagsToCheck[0] = "Player";
			Debug.LogWarning ("No pickup radius 'bounds' trigger attached to coin: " + transform.name + ", one has been added automatically", bounds);
		}
	}
开发者ID:ianburnette,项目名称:MarshBirds,代码行数:28,代码来源:Coin.cs

示例11: Start

    void Start()
    {
        worldManager = (WorldManager)FindObjectOfType (typeof(WorldManager));
        guiManager = (GUIManager)FindObjectOfType (typeof(GUIManager));

        characterMotor=worldManager.getPlayer().GetComponent<CharacterMotor>();
    }
开发者ID:Zulban,项目名称:viroid,代码行数:7,代码来源:LeaveMapTeleporter.cs

示例12: Awake

 void Awake()
 {
     GameObject gameconobj = GameObject.FindGameObjectWithTag(Tags.gameController);
     gamecon = gameconobj.GetComponent<GameController>();
     gman = gameconobj.GetComponent<GUIManager>();
     buttonRect = new Rect(640, 216, 640, 648);
 }
开发者ID:rpfypust,项目名称:RealisticPerspective,代码行数:7,代码来源:GameOverMenu.cs

示例13: Awake

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    void Awake()
    {
        Application.targetFrameRate = 60;

        m_players = new GameObject[2];

        if(GameObject.Find("PLAYER0"))
            m_players[0] = GameObject.Find("PLAYER0");
        else
            m_players[0] = GameObject.Find("PLAYER0_concept");

        if(GameObject.Find("PLAYER1"))
            m_players[1] = GameObject.Find("PLAYER1");
        else
            m_players[1] = GameObject.Find("PLAYER1_concept");

        targetCameraManager = GameObject.Find("TargetCamera");
        num_levels = PlayerPrefs.GetInt("num_levels");

        if(bConcept)
            triangle = (GameObject)Instantiate(Resources.Load("triangle", typeof(GameObject)));

        guiManager = GetComponent<GUIManager>();
        scoreManager = GetComponent<ScoreManager>();

        goAudioManager = GameObject.Find("goAudioManager");
    }
开发者ID:jsr2k1,项目名称:videojocjj,代码行数:28,代码来源:GameManager.cs

示例14: GUIRiver

    public GUIRiver(GUIManager gm)
    {
        this.gm = gm;

        menuWidth = gm.menuWidth;
        rightMenuOffset = gm.rightOffset;
        topOffset = gm.topOffset;
        buttonHeight = gm.smallButtonHeight;
        sideOffset = 10;
        scaleY = gm.scaleY;
        visibleArea = gm.visibleArea;

        rg = gm.cm.riverGenerator;
        rg.riverGui = this;

        riverFlags = new List<bool>();

        //width = 15;
        //areaEffect = 1;
        //depth = 0.2f;

        defaultRiver = new RiverInfo(rg);
        defaultRiver.SetDefaultValues();
        selectedRiver = defaultRiver;
    }
开发者ID:ja003,项目名称:Fractal-Nature-II,代码行数:25,代码来源:GUIRiver.cs

示例15: InitModal

    public void InitModal( GUIManager.ModalType modalType, string strMessage,
							UIEventListener.VoidDelegate[] btnDelegates, 
							UIEventListener.VoidDelegate CommonBtnDelegate )
    {
        this.modalType = modalType;

        // set label
        if( messageLabel != null )
            messageLabel.text = strMessage;

        // set event handler
        if( buttonListeners.Length >= 1 ) {
            buttonListeners[0].onClick = btnDelegates[0];
            buttonListeners[0].onClick += CommonBtnDelegate;
        }

        if( buttonListeners.Length >= 2 ) {
            buttonListeners[1].onClick = btnDelegates[1];
            buttonListeners[1].onClick += CommonBtnDelegate;
        }

        if( buttonListeners.Length >= 3 ) {
            buttonListeners[2].onClick = btnDelegates[2];
            buttonListeners[2].onClick += CommonBtnDelegate;
        }
    }
开发者ID:chichikov,项目名称:chichikov76,代码行数:26,代码来源:UIModal.cs


注:本文中的GUIManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。