diff --git a/Assets/Scripts/Entities/SyncBases/Computer.cs b/Assets/Scripts/Entities/SyncBases/Computer.cs
index 333c261..5feec4c 100644
--- a/Assets/Scripts/Entities/SyncBases/Computer.cs
+++ b/Assets/Scripts/Entities/SyncBases/Computer.cs
@@ -4,9 +4,21 @@ using Cyber.Console;
using Cyber.Util;
namespace Cyber.Entities.SyncBases {
+
+ ///
+ /// Runs functions.
+ ///
+ /// \todo Implement programs in an editor-friendly way
public class Computer : Interactable {
+ /// The "left key" key code.
public const string KeyCodeLeft = "KeyLeft";
+ /// The "right key" key code.
public const string KeyCodeRight = "KeyRight";
+
+ ///
+ /// The delegate which defines the function that will be run when the
+ /// computer is interacted with (directly or through keys).
+ ///
public delegate void RunProgram(Computer host, string key);
///
@@ -32,6 +44,12 @@ namespace Cyber.Entities.SyncBases {
///
public RunProgram Program;
+ ///
+ /// Runs the with some input, determined by the
+ /// Trigger.
+ ///
+ /// Determines the keycode given to the
+ /// .
public override void Interact(SyncBase Trigger) {
if (Trigger == KeyLeft) {
Screen.SetTextProperties(new TextTextureProperties("\n Pressed left!"));
@@ -42,16 +60,36 @@ namespace Cyber.Entities.SyncBases {
}
}
+ ///
+ /// No serialization needed (yet).
+ ///
+ ///
public override void Deserialize(NetworkReader reader) {
}
+
+ ///
+ /// No serialization needed (yet).
+ ///
+ ///
public override void Serialize(NetworkWriter writer) {
}
+ ///
+ /// Computers could have lots of data, and therefore should be hashed
+ /// to optimize bandwidth usage. No hurry in updating them though, so
+ /// an update per 10 ticks is enough.
+ ///
+ /// The sync handletype.
public override SyncHandletype GetSyncHandletype() {
return new SyncHandletype(true, 10);
}
+ ///
+ /// Computers should share state between different clients, so sync and
+ /// send interactions to the network.
+ ///
+ /// The Interaction information.
public override InteractableSyncdata GetInteractableSyncdata() {
return new InteractableSyncdata(true, true);
}