Stone
How do I use Stone
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
15 | Stone, | 1 |
113 | case StructureType.Stone: | 2 |
File name: Structure.cs
Copy
101 void AudioManager(){
102 switch (structure) {
103 case StructureType.Wood:
104 if(GameController.instance != null && MusicController.instance != null){
105 if(GameController.instance.isMusicOn){
106 if (gameObject != null) {
107 AudioSource.PlayClipAtPoint (woodSound, transform.position);
108 }
109 }
110 }
111 break;
112
113 case StructureType.Stone:
114 if(GameController.instance != null && MusicController.instance != null){
115 if(GameController.instance.isMusicOn){
116 if (gameObject != null) {
117 AudioSource.PlayClipAtPoint (stoneSound, transform.position);
118 }
119 }
120 }
121 break;
122
123 case StructureType.Glass:
124 if(GameController.instance != null && MusicController.instance != null){
125 if(GameController.instance.isMusicOn){
126 if (gameObject != null) {
127 AudioSource.PlayClipAtPoint (glassSound, transform.position);
128 }
129 }
130 }
131 break;
132 }
133 }
Download file with original file name:Stone
Stone 129 lượt xem
Gõ tìm kiếm nhanh...