[backcolor=rgb(250, 250, 250) !important][size=1em]1 [size=1em]2 [backcolor=rgb(250, 250, 250) !important][size=1em]3 [size=1em]4 [backcolor=rgb(250, 250, 250) !important][size=1em]5 [size=1em]6 [backcolor=rgb(250, 250, 250) !important][size=1em]7 [size=1em]8 [backcolor=rgb(250, 250, 250) !important][size=1em]9 [size=1em]10 [backcolor=rgb(250, 250, 250) !important][size=1em]11 [size=1em]12 [backcolor=rgb(250, 250, 250) !important][size=1em]13 [size=1em]14 | [size=1em][backcolor=rgb(250, 250, 250) !important][size=1em]using UnityEngine; [size=1em]using System.Collections; [backcolor=rgb(250, 250, 250) !important][size=1em] [size=1em]public class ContextMenu : MonoBehaviour { [backcolor=rgb(250, 250, 250) !important][size=1em] [size=1em]void OnGUI(){ [backcolor=rgb(250, 250, 250) !important][size=1em] if(Input.GetMouseButton(1)) [size=1em] { [backcolor=rgb(250, 250, 250) !important][size=1em] GUILayout.BeginArea (new Rect (Input.mousePosition.x,Screen.height-Input.mousePosition.y,200,200)); [size=1em] GUILayout.Box("This is a Context Menu"); [backcolor=rgb(250, 250, 250) !important][size=1em] GUILayout.EndArea (); [size=1em] } [backcolor=rgb(250, 250, 250) !important][size=1em] } [size=1em]} |
欢迎光临 纳金网 (http://go.narkii.com/club/) | Powered by Discuz! X2.5 |