Added highlights to all code blocks.
commited
commit
ee53a07c130dd01f10111e6895d76b6a273f1527
... | ... | @@ -19,7 +19,7 @@ As you know , Fancade's script blocks are located in different folders. To make |
19 | 19 | Following the C# syntax , let's imagine that each folder is a separate class with its own fields and functions. So , to represent Get Frame block , you need to type `Game.Frame`. Again , it's not necessary , just `Frame` is fine too. |
20 | 20 | |
21 | 21 | All the cases: |
22 | ``` |
|
22 | ```coffeescript
|
|
23 | 23 | //If block has yellow wires, add () at the end of the name |
24 | 24 | Game.Win(); |
25 | 25 | Sound.PlaySound(); |
... | ... | @@ -43,7 +43,7 @@ num frame = Game.Frame; |
43 | 43 | **____________________________________** |
44 | 44 | |
45 | 45 | #### Value Types |
46 | ``` |
|
46 | ```coffeescript
|
|
47 | 47 | //Variables and Data Types |
48 | 48 | num varName = 0; |
49 | 49 | tru varName = true/false; |
... | ... | @@ -63,7 +63,7 @@ vec $myPosition = Objects.GetPosition(me).position |
63 | 63 | #### Basic Math Operators |
64 | 64 | **____________________________________** |
65 | 65 | |
66 | ``` |
|
66 | ```coffeescript
|
|
67 | 67 | //Add Numbers |
68 | 68 | 2 + 2 |
69 | 69 | |
... | ... | @@ -92,7 +92,7 @@ num-- |
92 | 92 | |
93 | 93 | #### Basic Boolean Operators |
94 | 94 | **____________________________________** |
95 | ``` |
|
95 | ```coffeescript
|
|
96 | 96 | //Boolean logic (and, or, not) |
97 | 97 | |
98 | 98 | tru smart = ((not dumb) and (has_brain)) or already_smart; |
... | ... | @@ -115,7 +115,7 @@ tru greaterThanOrEqual = a >= b; |
115 | 115 | |
116 | 116 | ### Game Folder |
117 | 117 | **____________________________________** |
118 | ``` |
|
118 | ```coffeescript
|
|
119 | 119 | Game.Win(); |
120 | 120 | |
121 | 121 | Game.Lose(); |
... | ... | @@ -138,7 +138,7 @@ Game.Frame |
138 | 138 | |
139 | 139 | ### Objects |
140 | 140 | **____________________________________** |
141 | ``` |
|
141 | ```coffeescript
|
|
142 | 142 | Objects.GetPosition(obj).position |
143 | 143 | Objects.GetPosition(obj).rotation |
144 | 144 | |
... | ... | @@ -166,7 +166,7 @@ Objects.DestroyObject(obj Object); |
166 | 166 | |
167 | 167 | ### Sound |
168 | 168 | **____________________________________** |
169 | ``` |
|
169 | ```coffeescript
|
|
170 | 170 | Sound.PlaySound(num Volume, num Pitch); |
171 | 171 | num sfx = Sound.PlaySound(num Volume, num Pitch).channel |
172 | 172 | |
... | ... | @@ -179,7 +179,7 @@ Sound.VolumePitch(num Channel, num Volume, num Pitch); |
179 | 179 | |
180 | 180 | ### Physics |
181 | 181 | **____________________________________** |
182 | ``` |
|
182 | ```coffeescript
|
|
183 | 183 | //I regret doing this, sorry |
184 | 184 | ``` |
185 | 185 | |
... | ... | @@ -188,7 +188,7 @@ Sound.VolumePitch(num Channel, num Volume, num Pitch); |
188 | 188 | |
189 | 189 | ### Control |
190 | 190 | **____________________________________** |
191 | ``` |
|
191 | ```coffeescript
|
|
192 | 192 | //Basic if operator |
193 | 193 | If (condition) { |
194 | 194 | function_true; |
... | ... | @@ -233,7 +233,7 @@ LateUpdate() { |
233 | 233 | |
234 | 234 | ### Math |
235 | 235 | **____________________________________** |
236 | ``` |
|
236 | ```coffeescript
|
|
237 | 237 | Math.Negate(num Num) |
238 | 238 | |
239 | 239 | Math.Inverse(rot Rot) |