Jypeli
10
The simple game programming library
Toggle main menu visibility
Pääsivu
Paketit
Paketit
Paketin funktiot
Kaikki
a
b
c
d
h
j
k
m
r
s
t
v
x
Funktiot
Tyyppimäärittelyt
Luettelotyypit
Luokat
Luokkalista
Luokkaluettelo
Luokkahierarkia
Luokan jäsenet
Kaikki
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Funktiot
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Muuttujat
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Luettelotyypit
Ominaisuudet
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Tapahtumat
a
b
c
d
e
f
g
i
l
n
p
r
s
t
u
w
y
Tiedostot
Tiedostolista
Tiedoston jäsenet
Kaikki
_
c
i
j
m
r
s
v
x
Muuttujat
Tyyppimäärittelyt
c
i
j
m
r
s
v
x
•
Kaikki
Luokat
Nimiavaruudet
Tiedostot
Funktiot
Muuttujat
Tyyppimäärittelyt
Luettelotyypit
Luettelotyyppien arvot
Ominaisuudet
Tapahtumat
AndroidDevice.cs
Siirry tämän tiedoston dokumentaatioon.
1
//using System;
2
//using Jypeli.Devices;
3
// TODO: Make these work
4
//namespace Jypeli.Android
5
//{
6
// public class AndroidDevice : Device
7
// {
8
// private double _directionalSign = 1;
9
10
// public override bool IsMobileDevice
11
// {
12
// get { return true; }
13
// }
14
15
// public override bool IsPhone
16
// {
17
// get
18
// {
19
// // For now, just assume it is
20
// return true;
21
// }
22
// }
23
24
// public AndroidDevice()
25
// {
26
// this.Accelerometer = new AndroidAccelerometer();
27
// this.Storage = new LinuxFileManager( Environment.GetFolderPath( Environment.SpecialFolder.LocalApplicationData ) );
28
// }
29
30
// public override void Vibrate( int milliSeconds )
31
// {
32
// // todo
33
// }
34
35
// public override void StopVibrating()
36
// {
37
// // todo
38
// }
39
40
// protected override void UpdateScreen()
41
// {
42
// Vector defaultSize = Game.Screen.ViewportSize;
43
// Vector defaultScale = Vector.Diagonal;
44
45
// if ( DisplayResolution == DisplayResolution.Small )
46
// {
47
// defaultSize = new Vector( 400, 240 );
48
// defaultScale = new Vector( Game.Screen.ViewportSize.X / defaultSize.X, Game.Screen.ViewportSize.Y / defaultSize.Y );
49
// }
50
51
// if ( DisplayOrientation == DisplayOrientation.Portrait || DisplayOrientation == DisplayOrientation.PortraitInverse )
52
// {
53
// Game.Screen.Size = defaultSize.Transpose();
54
// Game.Screen.Scale = defaultScale.Transpose();
55
// Game.Screen.Angle = _directionalSign * (DisplayOrientation == DisplayOrientation.PortraitInverse ? -Angle.RightAngle : Angle.RightAngle);
56
// }
57
// else
58
// {
59
// Game.Screen.Size = defaultSize;
60
// Game.Screen.Scale = defaultScale;
61
// Game.Screen.Angle = Angle.Zero;
62
// _directionalSign = DisplayOrientation == DisplayOrientation.LandscapeRight ? -1 : 1;
63
// }
64
// }
65
// }
66
//}
Jypeli
Android
AndroidDevice.cs
Generoinut projektille Jypeli Tue Sep 14 2021 15:57:41
1.9.2