User:Cabra/Sandbox: Difference between revisions
Content added Content deleted
No edit summary |
mNo edit summary |
||
(9 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
__TOC__ |
__TOC__ |
||
</div> |
</div> |
||
This is my sandbox.<ref name="me">Me</ref> And it will be actively updated.<ref name="me" /> |
|||
This 1 2 3 4 6 7. |
|||
<br>EEEEEh |
|||
== First header == |
|||
First one. |
|||
== Code example == |
== Code example == |
||
<syntaxhighlight lang="cpp" line="1"> |
|||
<pre style="padding: 10px; border: 1px solid white; border-radius: 4px; witdh: 100%; background-color: #BBBBBB;"> |
|||
#include <iostream> |
#include <iostream> |
||
int main() |
int main() |
||
{ |
{ |
||
int x{0}; |
|||
while (x != 8) |
|||
{ |
|||
std::cout << "Ehh\n"; |
|||
x += 1; |
|||
std::cout << "x = " << x << '\n'; |
|||
} |
|||
return 0; |
|||
} |
} |
||
</syntaxhighlight> |
|||
</pre> |
|||
Why is this thing even here? lol |
Why is this thing even here? lol<br> |
||
Not likely to use it outside this sandbox, though. Don't see how. |
|||
<syntaxhighlight lang="gdscript" line="3"> |
|||
extends Area2D |
|||
const MAX_SPEED = 250 |
|||
== Trird header == |
|||
Third one. |
|||
func _process(delta): |
|||
=== First lesser header === |
|||
var speed = Vector2.ZERO |
|||
Fourth one. |
|||
if Input.is_action_pressed("move_right"): speed.x += 1 |
|||
<!-- Do you see? --> |
|||
else: speed.x -= 1 |
|||
## I don't know, test |
|||
speed *= MAX_SPEED |
|||
position += speed * delta |
|||
</syntaxhighlight> |
|||
== |
== References == |
||
<references /> |
|||
Fifth one. |
|||
{{DISPLAYTITLE:user:cabra/Sandbox}} |
Latest revision as of 17:33, 9 September 2022
This is my sandbox.[1] And it will be actively updated.[1]
Code example
#include <iostream>
int main()
{
int x{0};
while (x != 8)
{
std::cout << "Ehh\n";
x += 1;
std::cout << "x = " << x << '\n';
}
return 0;
}
Why is this thing even here? lol
Not likely to use it outside this sandbox, though. Don't see how.
extends Area2D
const MAX_SPEED = 250
func _process(delta):
var speed = Vector2.ZERO
if Input.is_action_pressed("move_right"): speed.x += 1
else: speed.x -= 1
## I don't know, test
speed *= MAX_SPEED
position += speed * delta