• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# GUIManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Start

	// Use this for initialization
	void Start () {

		if(Instance != null){
			GameObject.Destroy(gameObject);
		}
		else{
			GameObject.DontDestroyOnLoad(gameObject);
			Instance = this; 
		}
		//initialize sceneHandler object
		//sceneHandler = sceneHandler.GetComponent<SceneHandler>();
		//sceneHandler= GameObject.Find("SceneHandler").gameObject.GetComponent<GameObject>();
		charactersCanvas = charactersCanvas.GetComponent<Canvas> (); //drop the charactersCanvas to Unity
		evidenceCanvas = evidenceCanvas.GetComponent<Canvas> (); //drop the evidenceCanvas to Unity
		
		infoMainMenuCavas.enabled = true; //this is true by default, but just incase
		//initial sub menus are NOT enabled until clicked on
		charactersCanvas.enabled = false; //Exit button isn't pressed @ start of game
		evidenceCanvas.enabled = false;		
		//sub menu buttons
		queCharactersText = queCharactersText.GetComponent<Button>();
		evidenceText = evidenceText.GetComponent<Button>();
		quitGameText = quitGameText.GetComponent<Button>();

		backToInfoText = backToInfoText.GetComponent<Button>();

		//pickKillerObj = GameObject.Find("PickKillerEmpty").gameObject.GetComponent<PickKiller>();
		//killerID = pickKillerObj.getRandomizedKiller();
		//Debug.Log("KillerID from GUIManager: ");
		//Debug.Log(killerID);
	}
开发者ID:InvistiGator,项目名称:DogTective,代码行数:32,代码来源:GUIManager.cs


示例17: Awake

    private void Awake()
    {
        Debug.Log("Awake");
        myScriptScale = new ScriptScale();
        myScriptScale.PersonWidth = PersonWidth;
        myScriptScale.InterPersonSpacing = InterPersonSpacing;
        myScriptScale.InterHouseSpacing = InterHouseSpacing;
        myScriptScale.GenerationGap = GenerationGap;
        myScriptScale.ZScale = ZScale;

        // Let the GUI Manager know about our ZScale
        gui = FindObjectOfType(typeof(GUIManager)) as GUIManager;
        gui.SendMessage("myInitZScale", ZScale);

        myPeople = new MyPeople();
        _generationInformationDictionary = new Dictionary<int, GenerationInformation>();

        _personsBirthPlatformObjects = new GameObject[1500];
        _personsWeddingPlatformObjects = new GameObject[1500];

        _weddingDayDestinationObjects = new GameObject[1500];

        _birthDayDestinationObjects = new GameObject[1500];

        // _personPrefab = Resources.Load("FirstPerson");
    }
开发者ID:shuskey,项目名称:3DTree,代码行数:26,代码来源:Myscript.cs


示例18: getInstance

 public static GUIManager getInstance()
 {
     if(_instance == null)
     {
         _instance = GameObject.FindObjectOfType<GUIManager>();
     }
     return _instance;
 }
开发者ID:Rolom,项目名称:medusa,代码行数:8,代码来源:GUIManager.cs


示例19: Awake

 protected override void Awake()
 {
     base.Awake();
     gman = GameObject.FindGameObjectWithTag(Tags.gameController)
         .GetComponent<GUIManager>();
     bossBack = Util.makeSolid(new Color32(0x46, 0x0a, 0x04, 0xff));
     bossFore = Util.makeSolid(new Color32(0xc8, 0x14, 0x14, 0xff));
 }
开发者ID:rpfypust,项目名称:RealisticPerspective,代码行数:8,代码来源:Boss.cs


示例20: OnLoad

 public override void OnLoad()
 {
     _guiManager = GUIManager.getInstance();
     _pluginLoader = new HotPluginLoader(_pluginsPath, PluginLoaderWriteLine);
     
     WriteLine("Root Loader - Loaded");
     _pluginLoader.OnLoad();
 }
开发者ID:Rychard,项目名称:TimberAndStone.MasterPlugin,代码行数:8,代码来源:RootLoader.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# GUIMessage类代码示例发布时间:2022-05-24
下一篇:
C# GUID类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap