Lvl
How do I use Lvl
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
File name: PointedAtGameObjectInfo.cs
Copy
7 void OnGUI()
8 {
9 if (InputToEvent.goPointedAt != null)
10 {
11 PhotonView pv = InputToEvent.goPointedAt.GetPhotonView();
12 if (pv != null)
13 {
14 GUI.Label(new Rect(Input.mousePosition.x + 5, Screen.height - Input.mousePosition.y - 15, 300, 30), string.Format("ViewID {0} InstID {1} Lvl {2} {3}", pv.viewID, pv.instantiationId, pv.prefix, (pv.isSceneView) ? "scene" : (pv.isMine) ? "mine" : "owner: " + pv.ownerId));
15 }
16 }
17 }
File name: GameplayController.cs
Copy
61 void InitializeWeaponLevel(){
62 if (GameController.instance.weaponLevel != 5) {
63 currentWeaponLevel.text = "LVL " + GameController.instance.weaponLevel.ToString ();
64 int newLevel = GameController.instance.weaponLevel + 1;
65 nextWeaponLevel.text = "LVL " + newLevel.ToString ();
66 maxLevelText.gameObject.SetActive (false);
67 activeWeaponLevelText.text = GameController.instance.weaponLevel.ToString();
68 } else {
69 arrowIcon.SetActive (false);
70 currentWeaponLevel.gameObject.SetActive (false);
71 nextWeaponLevel.gameObject.SetActive (false);
72 maxLevelText.gameObject.SetActive (true);
73 activeWeaponLevelText.text = "MAX";
74 }
75 }
Lvl 147 lượt xem
Gõ tìm kiếm nhanh...