m |
|||
Line 1: | Line 1: | ||
+ | =API Keys= | ||
+ | |||
+ | |||
+ | |||
=Members= | =Members= | ||
{{ScriptFunction|void|DeductSilver|(int amount, Action< bool > onFinished);|Description|5=}} | {{ScriptFunction|void|DeductSilver|(int amount, Action< bool > onFinished);|Description|5=}} | ||
+ | |||
{{ScriptFunction|void|DeductSilver|(int amount, Closure onFinished);|Description|5=}} | {{ScriptFunction|void|DeductSilver|(int amount, Closure onFinished);|Description|5=}} | ||
− | {{ScriptFunction|void|AddSilver|(int amount, Action< bool > onFinished);| | + | |
− | {{ScriptFunction|void|AddSilver|(int amount, Closure onFinished);| | + | {{ScriptFunction|void|AddSilver|(int amount, Action< bool > onFinished);||5=}} |
+ | |||
+ | {{ScriptFunction|void|AddSilver|(int amount, Closure onFinished);|Adds amount of silver to player silver balance. You can also bind a function which will be called when operation is finished (optional). The source of the silver is Sinespace. |5=<pre>--the below script will give every player running it 1 silver every 10 seconds (from SineSpace) | ||
+ | --(Example: A silver giver that encourages visitors to stay) | ||
+ | --[The AccessKey we are using below is for preview servers only] | ||
+ | |||
+ | thisGameObject = Space.Host.ExecutingObject | ||
+ | |||
+ | Space.Economy.AccessKey = "b9184836-9c73-486a-b058-a0a668b860f7" | ||
+ | |||
+ | |||
+ | done = function() | ||
+ | |||
+ | Space.Log("1 Silver Recieved") | ||
+ | end | ||
+ | |||
+ | AddSilverCoroutine = function() | ||
+ | |||
+ | Space.Economy.AddSilver(1, done) | ||
+ | coroutine.yield(10) | ||
+ | |||
+ | end | ||
+ | |||
+ | |||
+ | |||
+ | Space.Host.StartCoroutine(AddSilverCoroutine)</pre>}} | ||
+ | |||
{{ScriptFunction|void|TransferSilverFrom|(int amount, string reason, int to, Action< bool > onFinished);|Description|5=}} | {{ScriptFunction|void|TransferSilverFrom|(int amount, string reason, int to, Action< bool > onFinished);|Description|5=}} | ||
+ | |||
{{ScriptFunction|void|TransferSilverFrom|(int amount, string reason, int to, Closure onFinished);|Description|5=}} | {{ScriptFunction|void|TransferSilverFrom|(int amount, string reason, int to, Closure onFinished);|Description|5=}} | ||
+ | |||
{{ScriptFunction|void|IssueReward|(int id, Action< bool > onFinished);|Description|5=}} | {{ScriptFunction|void|IssueReward|(int id, Action< bool > onFinished);|Description|5=}} | ||
+ | |||
{{ScriptFunction|void|IssueReward|(int id, Closure onFinished);|Description|5=}} | {{ScriptFunction|void|IssueReward|(int id, Closure onFinished);|Description|5=}} | ||
+ | |||
=Properties= | =Properties= | ||
{{ScriptFunction|string|AccessKey|{ set; };|Description|5=}} | {{ScriptFunction|string|AccessKey|{ set; };|Description|5=}} |
Description
Description
Adds amount of silver to player silver balance. You can also bind a function which will be called when operation is finished (optional). The source of the silver is Sinespace.
--the below script will give every player running it 1 silver every 10 seconds (from SineSpace) --(Example: A silver giver that encourages visitors to stay) --[The AccessKey we are using below is for preview servers only] thisGameObject = Space.Host.ExecutingObject Space.Economy.AccessKey = "b9184836-9c73-486a-b058-a0a668b860f7" done = function() Space.Log("1 Silver Recieved") end AddSilverCoroutine = function() Space.Economy.AddSilver(1, done) coroutine.yield(10) end Space.Host.StartCoroutine(AddSilverCoroutine)
Description
Description
Description
Description
Description