LeftShift









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

Featured Snippets


File name: OnClickRequestOwnership.cs Copy
8     public void OnClick()
9     {
10         if( Input.GetKey( KeyCode.LeftShift ) || Input.GetKey( KeyCode.RightShift ) )
11         {
12             Vector3 colVector = new Vector3( Random.Range( 0.0f, 1.0f ), Random.Range( 0.0f, 1.0f ), Random.Range( 0.0f, 1.0f ) );
13             this.photonView.RPC( "ColorRpc", PhotonTargets.AllBufferedViaServer, colVector );
14         }
15         else
16         {
17             if( this.photonView.ownerId == PhotonNetwork.player.ID )
18             {
19                 Debug.Log( "Not requesting ownership. Already mine." );
20                 return;
21             }
22
23             this.photonView.RequestOwnership();
24         }
25     }
File name: PhotonStatsGui.cs Copy
53     public void Update()
54     {
55         if (Input.GetKeyDown(KeyCode.Tab) && Input.GetKey(KeyCode.LeftShift))
56         {
57             this.statsWindowOn = !this.statsWindowOn;
58             this.statsOn = true; // enable stats when showing the window
59         }
60     }

LeftShift 141 lượt xem

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