Jypeli
9
The simple game programming library
Surfaces.cs
Siirry tämän tiedoston dokumentaatioon.
1
using
System
.Collections.Generic;
2
using
System
.Linq;
3
using
System
.Collections;
4
5
namespace
Jypeli
6
{
10
public
struct
Surfaces
: IEnumerable<Surface>
11
{
12
internal
Surface
l
,
r
,
t
,
b
;
13
17
public
Surface
Left
18
{
19
get
{
return
l
; }
20
}
21
25
public
Surface
Right
26
{
27
get
{
return
r
; }
28
}
29
33
public
Surface
Top
34
{
35
get
{
return
t
; }
36
}
37
41
public
Surface
Bottom
42
{
43
get
{
return
b
; }
44
}
45
51
public
IEnumerator<Surface>
GetEnumerator
()
52
{
53
if
(
Left
!=
null
) yield
return
Left
;
54
if
(
Right
!=
null
) yield
return
Right
;
55
if
(
Top
!=
null
) yield
return
Top
;
56
if
(
Bottom
!=
null
) yield
return
Bottom
;
57
}
58
64
IEnumerator IEnumerable.GetEnumerator()
65
{
66
if
(
Left
!=
null
) yield
return
Left
;
67
if
(
Right
!=
null
) yield
return
Right
;
68
if
(
Top
!=
null
) yield
return
Top
;
69
if
(
Bottom
!=
null
) yield
return
Bottom
;
70
}
71
77
public
IEnumerable<Surface>
Get
( params
Direction
[] directions )
78
{
79
if
( directions.Contains(
Direction
.
Left
) &&
Left
!=
null
) yield
return
Left
;
80
if
( directions.Contains(
Direction
.
Right
) &&
Right
!=
null
) yield
return
Right
;
81
if
( directions.Contains(
Direction
.
Up
) &&
Top
!=
null
) yield
return
Top
;
82
if
( directions.Contains(
Direction
.
Down
) &&
Bottom
!=
null
) yield
return
Bottom
;
83
}
84
}
85
}
Jypeli.Direction.Left
static Direction Left
Suunta vasemmalle.
Definition:
Direction.cs:66
Jypeli.Direction.Up
static Direction Up
Suunta ylös.
Definition:
Direction.cs:56
Jypeli
Definition:
Automobile.cs:5
Jypeli.Direction
Perussuunta tasossa.
Definition:
Direction.cs:47
Jypeli.Surfaces.Top
Surface Top
Yläreuna.
Definition:
Surfaces.cs:34
Jypeli.Direction.Down
static Direction Down
Suunta alas.
Definition:
Direction.cs:61
Jypeli.Surfaces.r
Surface r
Definition:
Surfaces.cs:12
Jypeli.Surfaces.b
Surface b
Definition:
Surfaces.cs:12
Jypeli.Surfaces.Bottom
Surface Bottom
Alareuna.
Definition:
Surfaces.cs:42
Jypeli.Surfaces.t
Surface t
Definition:
Surfaces.cs:12
System
Definition:
CFFauxAttributes.cs:29
Jypeli.Surface
Tasainen tai epätasainen pinta.
Definition:
Surface.cs:9
Jypeli.Surfaces.Right
Surface Right
Oikea reuna.
Definition:
Surfaces.cs:26
Jypeli.Surfaces
Kentän reunat.
Definition:
Surfaces.cs:11
Jypeli.Surfaces.Left
Surface Left
Vasen reuna.
Definition:
Surfaces.cs:18
Jypeli.Surfaces.l
Surface l
Definition:
Surfaces.cs:12
Jypeli.Surfaces.GetEnumerator
IEnumerator< Surface > GetEnumerator()
Enumeraattori pinnoille. Mahdollistaa foreach-lauseen käytön.
Definition:
Surfaces.cs:51
Jypeli.Surfaces.Get
IEnumerable< Surface > Get(params Direction[] directions)
Valikoiva enumeraattori pinnoille.
Definition:
Surfaces.cs:77
Jypeli.Direction.Right
static Direction Right
Suunta oikealle.
Definition:
Direction.cs:71
Jypeli
GameObjects
Surface
Surfaces.cs
Generoinut projektille Jypeli Sat Oct 17 2020 19:03:15
1.8.20