Jypeli
10
The simple game programming library
OneWayPlatformIgnorer.cs
Siirry tämän tiedoston dokumentaatioon.
1
namespace
Jypeli.Physics
2
{
3
#pragma warning disable CS1591
// Missing XML comment for publicly visible type or member
4
// TODO: Tämän voinee poistaa?
8
public
class
OneWayPlatformIgnorer
:
Ignorer
9
{
10
double
depthAllowed
;
11
12
13
public
OneWayPlatformIgnorer
(
double
depthAllowed
)
14
{
15
this.depthAllowed =
depthAllowed
;
16
}
17
18
public
override
bool
BothNeeded
19
{
20
get
21
{
22
return
false
;
23
}
24
}
25
26
public
override
bool
CanCollide
(
IPhysicsBody
thisBody,
IPhysicsBody
otherBody,
Ignorer
other)
27
{
28
if
(otherBody.
IgnoresPhysicsLogics
)
29
// || otherBody.IsBroadPhaseOnly)
30
{
31
return
true
;
32
}
33
34
return
thisBody.
Position
.
Y
-
depthAllowed
> otherBody.
Position
.
Y
;
35
}
36
}
37
}
Jypeli.Ignorer
Base class for Collision Ignorers to impliment.
Definition:
Ignorer.cs:40
Jypeli.Physics.OneWayPlatformIgnorer
Allows us to have platforms that are one way.
Definition:
OneWayPlatformIgnorer.cs:9
Jypeli.Physics.OneWayPlatformIgnorer.depthAllowed
double depthAllowed
Definition:
OneWayPlatformIgnorer.cs:10
Jypeli.Physics.OneWayPlatformIgnorer.CanCollide
override bool CanCollide(IPhysicsBody thisBody, IPhysicsBody otherBody, Ignorer other)
Definition:
OneWayPlatformIgnorer.cs:26
Jypeli.Physics.OneWayPlatformIgnorer.OneWayPlatformIgnorer
OneWayPlatformIgnorer(double depthAllowed)
Definition:
OneWayPlatformIgnorer.cs:13
Jypeli.Physics.OneWayPlatformIgnorer.BothNeeded
override bool BothNeeded
Definition:
OneWayPlatformIgnorer.cs:19
Jypeli.Physics.IPhysicsBody
Rajapinta fysiikkamoottorin tietämää fysiikkakappaletta varten.
Definition:
IPhysicsBody.cs:10
Jypeli.Physics.IPhysicsBody.Position
Vector Position
Definition:
IPhysicsBody.cs:26
Jypeli.Physics.IPhysicsBody.IgnoresPhysicsLogics
bool IgnoresPhysicsLogics
Definition:
IPhysicsBody.cs:39
Jypeli.Physics
Definition:
Collision.cs:5
Jypeli.Vector.Y
double Y
Vektorin Y-komponentti
Definition:
Vector.cs:339
Jypeli
Physics
Ignorers
OneWayPlatformIgnorer.cs
Generoinut projektille Jypeli Tue Sep 14 2021 15:57:42
1.9.2