Ordinal









How do I use Ordinal
Below are practical examples compiled from projects for learning and reference purposes

Featured Snippets


File name: ClickDetector.cs Copy
7  void Update()
8     {
9         // if this player is not "it", the player can't tag anyone, so don't do anything on collision
10         if (PhotonNetwork.player.ID != GameLogic.playerWhoIsIt)
11         {
12             return;
13         }
14
15         if (Input.GetButton("Fire1"))
16         {
17             GameObject goPointedAt = RaycastObject(Input.mousePosition);
18
19             if (goPointedAt != null && goPointedAt != this.gameObject && goPointedAt.name.Equals("monsterprefab(Clone)", StringComparison.OrdinalIgnoreCase))
20             {
21                 PhotonView rootView = goPointedAt.transform.root.GetComponent();
22                 GameLogic.TagPlayer(rootView.owner.ID);
23             }
24         }
25  }

Ordinal 125 lượt xem

Gõ tìm kiếm nhanh...