Skip to content

Commit 8d52d9a

Browse files
committed
Added Example Project
1 parent 8b7855a commit 8d52d9a

13 files changed

+535
-0
lines changed
+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<c2project>
3+
<name>Ethereum Plugin Example</name>
4+
<description></description>
5+
<version>1.0.0.0</version>
6+
<author></author>
7+
<author-email></author-email>
8+
<author-website>http://</author-website>
9+
<app-id>com.mycompany.myapp</app-id>
10+
<unique-id>20msmk7xae0oa</unique-id>
11+
<saved-with-version>24400</saved-with-version>
12+
<used-plugins>
13+
<plugin author="Scirra" id="Browser" version="1">Browser</plugin>
14+
<plugin author="Scirra" id="Button" version="1">Button</plugin>
15+
<plugin author="Scirra" id="Ethereum" version="1">Ethereum</plugin>
16+
<plugin author="Scirra" id="EthereumContract" version="1">Ethereum Contract</plugin>
17+
<plugin author="Scirra" id="Text" version="1">Text</plugin>
18+
<plugin author="Scirra" id="TextBox" version="1">Text box</plugin>
19+
</used-plugins>
20+
<used-behaviors />
21+
<used-effects />
22+
<configurations>
23+
<configuration exporter-descname="HTML5" exporter-id="html5" name="HTML5" />
24+
</configurations>
25+
<window-size>
26+
<width>854</width>
27+
<height>480</height>
28+
</window-size>
29+
<pixel-rounding>0</pixel-rounding>
30+
<preview-effects>1</preview-effects>
31+
<use-loader-layout>0</use-loader-layout>
32+
<configuration-settings>
33+
<prop name="Clear background">Yes</prop>
34+
<prop name="Downscaling">Medium quality</prop>
35+
<prop name="Enable WebGL">On</prop>
36+
<prop name="Fullscreen in browser">Letterbox scale</prop>
37+
<prop name="Fullscreen scaling">High quality</prop>
38+
<prop name="Loader style">Construct 2 splash</prop>
39+
<prop name="Orientations">Any</prop>
40+
<prop name="Pause on unfocus">No</prop>
41+
<prop name="Physics engine">Box2D asm.js</prop>
42+
<prop name="Preload sounds">Yes</prop>
43+
<prop name="Preview browser">(default)</prop>
44+
<prop name="Sampling">Linear</prop>
45+
<prop name="Use high-DPI display">Yes</prop>
46+
</configuration-settings>
47+
<object-folder>
48+
<object-type name="Ethereum" sid="146077430472518">
49+
<plugin id="Ethereum" />
50+
</object-type>
51+
<object-type global="1" name="ExampleContractA" sid="980196262532444">
52+
<plugin id="EthereumContract" />
53+
</object-type>
54+
<object-type name="YourAccount" sid="356298256857627">
55+
<plugin id="Text" />
56+
</object-type>
57+
<object-type name="ContractA" sid="163737717877755">
58+
<plugin id="Text" />
59+
</object-type>
60+
<object-type name="YourNumber" sid="717856670644092">
61+
<plugin id="Text" />
62+
</object-type>
63+
<object-type name="SetYourNumberTextBox" sid="506100790391669">
64+
<plugin id="TextBox" />
65+
</object-type>
66+
<object-type name="SetYourNumberButton" sid="648553046693030">
67+
<plugin id="Button" />
68+
</object-type>
69+
<object-type name="WaitingForMining" sid="875116214125290">
70+
<plugin id="Text" />
71+
</object-type>
72+
<object-type name="Browser" sid="206072878394242">
73+
<plugin id="Browser" />
74+
</object-type>
75+
</object-folder>
76+
<families />
77+
<layout-folder>
78+
<layout>Layout 1.xml</layout>
79+
</layout-folder>
80+
<event-folder>
81+
<event-sheet>Event sheet 1.xml</event-sheet>
82+
</event-folder>
83+
<global-instances>
84+
<global-instance type="Ethereum" uid="0" />
85+
<global-instance type="Browser" uid="8" />
86+
</global-instances>
87+
<sounds-folder />
88+
<music-folder />
89+
<files-folder>
90+
<file-folder name="Icons">
91+
<file name="icon-16.png" />
92+
<file name="icon-32.png" />
93+
<file name="icon-114.png" />
94+
<file name="icon-128.png" />
95+
<file name="icon-256.png" />
96+
<file name="loading-logo.png" />
97+
</file-folder>
98+
</files-folder>
99+
</c2project>
173 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<c2uistate>
3+
<!--This is a UI state file - its content describes the user interface settings when the project was last open.
4+
It is entirely optional and the project will load without it. If you are placing the project under source control,
5+
you probably do not want to add any .uistate.xml files to the repository.-->
6+
<configurations>
7+
<active>
8+
<configuration name="HTML5" />
9+
</active>
10+
<display name="HTML5" />
11+
</configurations>
12+
<open-tabs>
13+
<layout order="0">Layout 1</layout>
14+
<event-sheet active="1" order="1">Event sheet 1</event-sheet>
15+
</open-tabs>
16+
<properties>
17+
<property expanded="1" name="About" />
18+
<property expanded="1" name="Project settings" />
19+
<property expanded="0" name="Window Size" />
20+
<property expanded="1" name="Configuration Settings" />
21+
</properties>
22+
<families-expanded root="1" />
23+
<folders-expanded>
24+
<folder expanded="1" path="object-folder/" />
25+
<folder expanded="1" path="layout-folder/" />
26+
<folder expanded="1" path="event-folder/" />
27+
<folder expanded="1" path="file-folder/" />
28+
<folder expanded="1" path="sound-folder/" />
29+
<folder expanded="1" path="music-folder/" />
30+
<folder expanded="0" path="file-folder/Icons/" />
31+
</folders-expanded>
32+
</c2uistate>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<c2uistate>
3+
<!--This is a UI state file - its content describes the user interface settings when the event sheet was last open.
4+
It is entirely optional and the project will load without it. If you are placing the project under source control,
5+
you probably do not want to add any .uistate.xml files to the repository.-->
6+
<show-addaction-links>1</show-addaction-links>
7+
<scroll-pos>0</scroll-pos>
8+
<conditions-column>491</conditions-column>
9+
<actions-namecolumn>24</actions-namecolumn>
10+
<condition-namecolumns>
11+
<nest>80</nest>
12+
<nest>80</nest>
13+
<nest>80</nest>
14+
<nest>80</nest>
15+
<nest>80</nest>
16+
<nest>80</nest>
17+
<nest>65</nest>
18+
<nest>47</nest>
19+
<nest>29</nest>
20+
<nest>22</nest>
21+
</condition-namecolumns>
22+
<events />
23+
</c2uistate>
+148
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<c2eventsheet>
3+
<!--All the 'name' attributes are ignored by Construct 2 - they are there for readability only.-->
4+
<name>Event sheet 1</name>
5+
<events>
6+
<variable constant="0" name="transactionHash" sid="446150716583795" static="0" type="text"></variable>
7+
<event-block sid="509925707560013">
8+
<conditions>
9+
<condition id="-6" name="Every X seconds" sid="408120403164999" type="System">
10+
<param id="0" name="Interval (seconds)">1.0</param>
11+
</condition>
12+
</conditions>
13+
<actions />
14+
<sub-events>
15+
<event-block sid="610890934215784">
16+
<conditions>
17+
<condition id="-8" name="Compare two values" sid="830882158635870" type="System">
18+
<param id="0" name="First value">Ethereum.IsConnected</param>
19+
<param id="1" name="Comparison">0</param>
20+
<param id="2" name="Second value">1</param>
21+
</condition>
22+
</conditions>
23+
<actions>
24+
<action id="0" name="Set text" sid="860838014464502" type="YourAccount">
25+
<param id="0" name="Text">&quot;Your account is:&quot; &amp; Ethereum.Coinbase</param>
26+
</action>
27+
</actions>
28+
</event-block>
29+
<event-block sid="162548887694750">
30+
<conditions>
31+
<condition id="-22" name="Else" sid="429022296326978" type="System" />
32+
</conditions>
33+
<actions>
34+
<action id="0" name="Set text" sid="229679899195688" type="YourAccount">
35+
<param id="0" name="Text">&quot;Your account is not connected&quot;</param>
36+
</action>
37+
</actions>
38+
</event-block>
39+
</sub-events>
40+
</event-block>
41+
<event-block sid="883993896273589">
42+
<conditions>
43+
<condition id="-6" name="Every X seconds" sid="752603787129060" type="System">
44+
<param id="0" name="Interval (seconds)">1.0</param>
45+
</condition>
46+
</conditions>
47+
<actions>
48+
<action id="0" name="Call" sid="698266303060983" type="ExampleContractA">
49+
<param id="0" name="Name with parameters types">&quot;GetMyNumber&quot;</param>
50+
<param id="1" name="Parameter {n}"></param>
51+
<param id="2" name="Callback id">&quot;GetMyNumberCallback&quot;</param>
52+
</action>
53+
</actions>
54+
</event-block>
55+
<event-block sid="394608527963489">
56+
<conditions>
57+
<condition id="1" name="On function success" sid="415368646700117" type="ExampleContractA">
58+
<param id="0" name="ID">&quot;GetMyNumberCallback&quot;</param>
59+
</condition>
60+
</conditions>
61+
<actions>
62+
<action id="0" name="Set text" sid="987353176861642" type="YourNumber">
63+
<param id="0" name="Text">&quot;Your number is: &quot; &amp; ExampleContractA.CurrentCallbackResponse &amp; ExampleContractA.CurrentCallbackError</param>
64+
</action>
65+
</actions>
66+
</event-block>
67+
<event-block sid="822772268946450">
68+
<conditions>
69+
<condition id="2" name="On function error" sid="749404467993205" type="ExampleContractA">
70+
<param id="0" name="ID">&quot;GetMyNumberCallback&quot;</param>
71+
</condition>
72+
</conditions>
73+
<actions>
74+
<action id="0" name="Set text" sid="470197336335563" type="YourNumber">
75+
<param id="0" name="Text">&quot;Your number is: &quot; &amp; ExampleContractA.CurrentCallbackError</param>
76+
</action>
77+
</actions>
78+
</event-block>
79+
<event-block sid="837393656109423">
80+
<conditions>
81+
<condition id="0" name="On clicked" sid="237622298308912" type="SetYourNumberButton" />
82+
</conditions>
83+
<actions>
84+
<action id="1" name="Send" sid="316798332115717" type="ExampleContractA">
85+
<param id="0" name="Name with parameters types">&quot;SetMyNumber&quot;</param>
86+
<param id="1" name="Parameter {n}">int(SetYourNumberTextBox.Text)</param>
87+
<param id="2" name="Callback id">&quot;SetMyNumberCallback&quot;</param>
88+
<param id="3" name="Value">0</param>
89+
</action>
90+
</actions>
91+
</event-block>
92+
<event-block sid="924736551615739">
93+
<conditions>
94+
<condition id="1" name="On function success" sid="779222074301653" type="ExampleContractA">
95+
<param id="0" name="ID">&quot;SetMyNumberCallback&quot;</param>
96+
</condition>
97+
</conditions>
98+
<actions>
99+
<action id="-15" name="Set visible" sid="508294509475453" type="WaitingForMining">
100+
<param id="0" name="Visibility">1</param>
101+
</action>
102+
<action id="-9" name="Set value" sid="139087043711281" type="System">
103+
<param id="0" name="Variable">transactionHash</param>
104+
<param id="1" name="Value">ExampleContractA.CurrentCallbackResponse</param>
105+
</action>
106+
<action id="3" name="Get Transaction Receipt" sid="625910675294426" type="Ethereum">
107+
<param id="0" name="Hash">transactionHash</param>
108+
<param id="1" name="Callback id">&quot;GetTransactionReceiptCallback&quot;</param>
109+
</action>
110+
</actions>
111+
</event-block>
112+
<event-block sid="459032431513902">
113+
<conditions>
114+
<condition id="1" name="On function success" sid="314008797012102" type="Ethereum">
115+
<param id="0" name="ID">&quot;GetTransactionReceiptCallback&quot;</param>
116+
</condition>
117+
</conditions>
118+
<actions />
119+
<sub-events>
120+
<event-block sid="753377141086537">
121+
<conditions>
122+
<condition id="-8" name="Compare two values" sid="239270672095644" type="System">
123+
<param id="0" name="First value">Ethereum.CurrentCallbackResponse</param>
124+
<param id="1" name="Comparison">0</param>
125+
<param id="2" name="Second value">&quot;&quot;</param>
126+
</condition>
127+
</conditions>
128+
<actions>
129+
<action id="3" name="Get Transaction Receipt" sid="163259916419931" type="Ethereum">
130+
<param id="0" name="Hash">transactionHash</param>
131+
<param id="1" name="Callback id">&quot;GetTransactionReceiptCallback&quot;</param>
132+
</action>
133+
</actions>
134+
</event-block>
135+
<event-block sid="285407469449302">
136+
<conditions>
137+
<condition id="-22" name="Else" sid="281868586032457" type="System" />
138+
</conditions>
139+
<actions>
140+
<action id="-15" name="Set visible" sid="834618035961752" type="WaitingForMining">
141+
<param id="0" name="Visibility">0</param>
142+
</action>
143+
</actions>
144+
</event-block>
145+
</sub-events>
146+
</event-block>
147+
</events>
148+
</c2eventsheet>

Example/Files/icon-114.png

24.6 KB
Loading

Example/Files/icon-128.png

32.6 KB
Loading

Example/Files/icon-16.png

1.02 KB
Loading

Example/Files/icon-256.png

96 KB
Loading

Example/Files/icon-32.png

2.9 KB
Loading

Example/Files/loading-logo.png

9.16 KB
Loading

Example/Layouts/Layout 1.uistate.xml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<c2uistate>
3+
<!--This is a UI state file - its content describes the user interface settings when the layout was last open.
4+
It is entirely optional and the project will load without it. If you are placing the project under source control,
5+
you probably do not want to add any .uistate.xml files to the repository.-->
6+
<camera>
7+
<position-x>505</position-x>
8+
<position-y>202.5</position-y>
9+
<position-z>100</position-z>
10+
<lookat-x>505</lookat-x>
11+
<lookat-y>202.5</lookat-y>
12+
<lookat-z>0</lookat-z>
13+
</camera>
14+
<snap-to-grid>0</snap-to-grid>
15+
<show-grid>0</show-grid>
16+
<snap-width>32</snap-width>
17+
<snap-height>32</snap-height>
18+
<show-collision-polys>0</show-collision-polys>
19+
<translucent-inactive-layers>0</translucent-inactive-layers>
20+
<properties>
21+
<property expanded="1" name="Layout properties" />
22+
<property expanded="0" name="Layout Size" />
23+
<property expanded="0" name="Margins" />
24+
<property expanded="1" name="Effects" />
25+
</properties>
26+
<active-layer name="Layer 0" />
27+
<layers>
28+
<layer locked="0" name="Layer 0" parallax-in-editor="0" visible="1" />
29+
</layers>
30+
</c2uistate>

0 commit comments

Comments
 (0)