Jypeli 10
The simple game programming library
OneWayPlatformIgnorer.cs
Siirry tämän tiedoston dokumentaatioon.
1namespace Jypeli.Physics
2{
3#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
4 // TODO: Tämän voinee poistaa?
9 {
11
12
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}
Base class for Collision Ignorers to impliment.
Definition: Ignorer.cs:40
Allows us to have platforms that are one way.
override bool CanCollide(IPhysicsBody thisBody, IPhysicsBody otherBody, Ignorer other)
Rajapinta fysiikkamoottorin tietämää fysiikkakappaletta varten.
Definition: IPhysicsBody.cs:10
double Y
Vektorin Y-komponentti
Definition: Vector.cs:339