-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
uno.scroll
213 lines (178 loc) · 4.09 KB
/
uno.scroll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
import ../code/conceptPage.scroll
id uno
name Uno
appeared 2002
tags pl
website https://fuseopen.com
latestVersion 3.0.0-beta.10
conceptDescription The Uno langauge is a dialect of C#, designed for cross-compilation to C++ and other languages. Uno does not require the .NET Framework, but has instead a more lightweight library called UnoCore. The syntax of Uno is more or less identical to C#, with deviations documented here.
isOpenSource true
writtenIn csharp xml java cpp bourne-shell objective-cpp markdown json javascript python gradle cmake xaml bash yaml make swift typescript
tryItOnline uno
fileType text
centralPackageRepositoryCount 0
repoStats
firstCommit 2002
commits 6031
committers 33
files 3339
newestCommit 2024
reference https://fuseopen.com/docs/uno/uno-lang.html
githubRepo https://github.com/fuse-open/uno
firstCommit 2002
stars 75
forks 20
subscribers 7
created 2018
updated 2022
description Extremely fast, native C#-dialect and powerful tooling for mobile and desktop developers
issues 12
domainName fuseopen.com
registered 2017
awisRank
2022 692043
githubBigQuery Uno
repos 37
users 24
linguistGrammarRepo https://github.com/atom/language-csharp
firstCommit 2014
lastCommit 2018
committerCount 30
commitCount 235
sampleCount 3
example
using Uno;
using Uno.Collections;
using Uno.Graphics;
using Uno.Scenes;
using Uno.Designer;
using Uno.Content;
using Uno.Content.Models;
using Uno.UI;
namespace PONG2D
{
public class PlayerPads : Node
{
Image _player1Image;
Image _player2Image;
[Inline]
public Image Player1
{
get { return _player1Image; }
set
{
if (_player1Image != value)
{
_player1Image = value;
}
}
}
[Inline]
public Image Player2
{
get { return _player2Image; }
set
{
if (_player2Image != value)
{
_player2Image = value;
}
}
}
[Hide]
public float2 Player1Pos
{
get { return (Player1.ActualPosition); }
set
{
if (Player1 != null)
Player1.Position = value;
}
}
[Hide]
public float2 Player2Pos
{
get { return (Player2.ActualPosition); }
set
{
if (Player2 != null)
Player2.Position = value;
}
}
public Rect Player1Rect
{
get { return new Rect(Player1Pos, float2(Player1.Width, Player2.Height)); }
set
{
Player1Pos = value.Position;
if (Player1 != null)
{
Player1.Width = value.Size.X;
Player1.Height = value.Size.Y;
}
}
}
public Rect Player2Rect
{
get { return new Rect(Player2Pos, float2(Player2.Width, Player2.Height)); }
set
{
Player2Pos = value.Position;
if (Player2 != null)
{
Player2.Width = value.Size.X;
Player2.Height = value.Size.Y;
}
}
}
public Ball Ball
{
get;
set;
}
public float PadVelocity { get; set; }
public PlayerPads()
{
}
void UpdatePositions()
{
}
protected override void OnUpdate()
{
base.OnUpdate();
if (Input.IsKeyDown(Uno.Platform.Key.W))
{
Player1Pos = float2(0, Player1Pos.Y - PadVelocity);
}
if (Input.IsKeyDown(Uno.Platform.Key.S))
{
Player1Pos = float2(0, Player1Pos.Y + PadVelocity);
}
if (Input.IsKeyDown(Uno.Platform.Key.Up))
{
Player2Pos = float2(0, Player2Pos.Y - PadVelocity);
}
if (Input.IsKeyDown(Uno.Platform.Key.Down))
{
Player2Pos = float2(0, Player2Pos.Y + PadVelocity);
}
if (Ball != null)
{
if (Ball.BallRectangle.Intersects(Player1Rect) ||
Ball.BallRectangle.Intersects(Player2Rect))
{
Ball.BallVelocity = float2(Ball.BallVelocity.X * -1f, Ball.BallVelocity.Y);
}
}
}
}
}
githubLanguage Uno
fileExtensions uno
trendingProjectsCount 0
type programming
aceMode csharp
codemirrorMode clike
codemirrorMimeType text/x-csharp
tmScope source.cs
repos 232