Fix indentations in class reference XMLs
This commit is contained in:
@ -5,7 +5,7 @@
|
|||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
Base resource for [AnimationTree] nodes. In general, it's not used directly, but you can create custom ones with custom blending formulas.
|
Base resource for [AnimationTree] nodes. In general, it's not used directly, but you can create custom ones with custom blending formulas.
|
||||||
Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead.
|
Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead.
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||||
|
|||||||
@ -5,52 +5,52 @@
|
|||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
The HMACContext class is useful for advanced HMAC use cases, such as streaming the message as it supports creating the message over time rather than providing it all at once.
|
The HMACContext class is useful for advanced HMAC use cases, such as streaming the message as it supports creating the message over time rather than providing it all at once.
|
||||||
[codeblocks]
|
[codeblocks]
|
||||||
[gdscript]
|
[gdscript]
|
||||||
extends Node
|
extends Node
|
||||||
var ctx = HMACContext.new()
|
var ctx = HMACContext.new()
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
var key = "supersecret".to_utf8()
|
var key = "supersecret".to_utf8()
|
||||||
var err = ctx.start(HashingContext.HASH_SHA256, key)
|
var err = ctx.start(HashingContext.HASH_SHA256, key)
|
||||||
assert(err == OK)
|
assert(err == OK)
|
||||||
var msg1 = "this is ".to_utf8()
|
var msg1 = "this is ".to_utf8()
|
||||||
var msg2 = "vewy vewy secret".to_utf8()
|
var msg2 = "vewy vewy secret".to_utf8()
|
||||||
err = ctx.update(msg1)
|
err = ctx.update(msg1)
|
||||||
assert(err == OK)
|
assert(err == OK)
|
||||||
err = ctx.update(msg2)
|
err = ctx.update(msg2)
|
||||||
assert(err == OK)
|
assert(err == OK)
|
||||||
var hmac = ctx.finish()
|
var hmac = ctx.finish()
|
||||||
print(hmac.hex_encode())
|
print(hmac.hex_encode())
|
||||||
|
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
using Godot;
|
using Godot;
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
public class CryptoNode : Node
|
public class CryptoNode : Node
|
||||||
{
|
{
|
||||||
private HMACContext ctx = new HMACContext();
|
private HMACContext ctx = new HMACContext();
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
PackedByteArray key = String("supersecret").to_utf8();
|
PackedByteArray key = String("supersecret").to_utf8();
|
||||||
Error err = ctx.Start(HashingContext.HASH_SHA256, key);
|
Error err = ctx.Start(HashingContext.HASH_SHA256, key);
|
||||||
GD.Assert(err == OK);
|
GD.Assert(err == OK);
|
||||||
PackedByteArray msg1 = String("this is ").to_utf8();
|
PackedByteArray msg1 = String("this is ").to_utf8();
|
||||||
PackedByteArray msg2 = String("vewy vew secret").to_utf8();
|
PackedByteArray msg2 = String("vewy vew secret").to_utf8();
|
||||||
err = ctx.Update(msg1);
|
err = ctx.Update(msg1);
|
||||||
GD.Assert(err == OK);
|
GD.Assert(err == OK);
|
||||||
err = ctx.Update(msg2);
|
err = ctx.Update(msg2);
|
||||||
GD.Assert(err == OK);
|
GD.Assert(err == OK);
|
||||||
PackedByteArray hmac = ctx.Finish();
|
PackedByteArray hmac = ctx.Finish();
|
||||||
GD.Print(hmac.HexEncode());
|
GD.Print(hmac.HexEncode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[/csharp]
|
[/csharp]
|
||||||
[/codeblocks]
|
[/codeblocks]
|
||||||
[b]Note:[/b] Not available in HTML5 exports.
|
[b]Note:[/b] Not available in HTML5 exports.
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
</tutorials>
|
</tutorials>
|
||||||
|
|||||||
@ -107,36 +107,36 @@
|
|||||||
<description>
|
<description>
|
||||||
Waits for a packet to arrive on the bound address. See [method bind].
|
Waits for a packet to arrive on the bound address. See [method bind].
|
||||||
[b]Note:[/b] [method wait] can't be interrupted once it has been called. This can be worked around by allowing the other party to send a specific "death pill" packet like this:
|
[b]Note:[/b] [method wait] can't be interrupted once it has been called. This can be worked around by allowing the other party to send a specific "death pill" packet like this:
|
||||||
[codeblocks]
|
[codeblocks]
|
||||||
[gdscript]
|
[gdscript]
|
||||||
socket = PacketPeerUDP.new()
|
socket = PacketPeerUDP.new()
|
||||||
# Server
|
# Server
|
||||||
socket.set_dest_address("127.0.0.1", 789)
|
socket.set_dest_address("127.0.0.1", 789)
|
||||||
socket.put_packet("Time to stop".to_ascii())
|
socket.put_packet("Time to stop".to_ascii())
|
||||||
|
|
||||||
# Client
|
# Client
|
||||||
while socket.wait() == OK:
|
while socket.wait() == OK:
|
||||||
var data = socket.get_packet().get_string_from_ascii()
|
var data = socket.get_packet().get_string_from_ascii()
|
||||||
if data == "Time to stop":
|
if data == "Time to stop":
|
||||||
return
|
return
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
var socket = new PacketPeerUDP();
|
var socket = new PacketPeerUDP();
|
||||||
// Server
|
// Server
|
||||||
socket.SetDestAddress("127.0.0.1", 789);
|
socket.SetDestAddress("127.0.0.1", 789);
|
||||||
socket.PutPacket("Time to stop".ToAscii());
|
socket.PutPacket("Time to stop".ToAscii());
|
||||||
|
|
||||||
// Client
|
// Client
|
||||||
while (socket.Wait() == OK)
|
while (socket.Wait() == OK)
|
||||||
{
|
{
|
||||||
string data = socket.GetPacket().GetStringFromASCII();
|
string data = socket.GetPacket().GetStringFromASCII();
|
||||||
if (data == "Time to stop")
|
if (data == "Time to stop")
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[/csharp]
|
[/csharp]
|
||||||
[/codeblocks]
|
[/codeblocks]
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
|
|||||||
@ -336,7 +336,6 @@
|
|||||||
<argument index="0" name="body" type="RID" />
|
<argument index="0" name="body" type="RID" />
|
||||||
<description>
|
<description>
|
||||||
Returns the physics layer or layers a body can collide with.
|
Returns the physics layer or layers a body can collide with.
|
||||||
-
|
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="body_get_constant_force" qualifiers="const">
|
<method name="body_get_constant_force" qualifiers="const">
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
This class contains the list of attachment descriptions for a framebuffer pass. Each points with an index to a previously supplied list of texture attachments.
|
This class contains the list of attachment descriptions for a framebuffer pass. Each points with an index to a previously supplied list of texture attachments.
|
||||||
Multipass framebuffers can optimize some configurations in mobile, on desktop they provide little to no advantage.
|
Multipass framebuffers can optimize some configurations in mobile, on desktop they provide little to no advantage.
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
</tutorials>
|
</tutorials>
|
||||||
|
|||||||
Reference in New Issue
Block a user