Godot Nature of Code
1.2.0
Nature of Code implemented in Godot Engine
|
Swimming fish. More...
Public Member Functions | |
SwimmingFish () | |
Create a swimming fish. More... | |
![]() | |
SimpleMover () | |
Create a simple wrapping mover with a circle mesh. More... | |
SimpleMover (WrapModeEnum wrapMode) | |
Create a simple mover with a custom wrap mode and a circle mesh. More... | |
virtual void | ApplyForce (Vector2 force) |
Apply force on mover. More... | |
virtual void | ApplyAngularForce (float force) |
Apply angular force on mover. More... | |
virtual void | ApplyFriction (float coef) |
Apply friction on mover. More... | |
virtual void | ApplyAngularFriction (float coef) |
Apply angular friction on mover. More... | |
virtual void | ApplyDrag (float coef) |
Apply drag on mover. More... | |
virtual void | ApplyDamping (float coef) |
Apply damping on mover. More... | |
Public Attributes | |
float | TailSpeed = 10f |
Tail speed More... | |
Color | BaseColor = Colors.CadetBlue |
Base color More... | |
float | ForwardAcceleration = 0.25f |
Forward acceleration More... | |
float | SideOffsetAcceleration = 0.1f |
Side offset acceleration More... | |
![]() | |
bool | DebugDrawEnabled |
Debug draw enabled? More... | |
![]() | |
Vector2 | Velocity = Vector2.Zero |
Current velocity More... | |
Vector2 | Acceleration = Vector2.Zero |
Current acceleration More... | |
float | AngularVelocity |
Current angular velocity More... | |
float | AngularAcceleration |
Current angular acceleration More... | |
float | MaxVelocity = 10 |
Max velocity More... | |
float | MaxAngularVelocity = 0.1f |
Max angular velocity More... | |
float | Mass = 1 |
Mass More... | |
WrapModeEnum | WrapMode |
Wrapping mode More... | |
bool | DisableForces |
Disable forces More... | |
bool | SyncRotationOnVelocity |
Synchronize rotation on velocity More... | |
SimpleMesh | Mesh |
Mesh More... | |
Protected Member Functions | |
override void | UpdateAcceleration () |
Update acceleration value. More... | |
Additional Inherited Members | |
![]() | |
enum class | WrapModeEnum { Wrap , Bounce , None } |
Wrapping mode enum. More... | |
![]() | |
CollisionShape2D | collisionShape2D |
Collision shape More... | |
![]() | |
bool | Drawing [get, set] |
Draw mesh More... | |
Vector2 | MeshSize [get, set] |
Mesh size More... | |
float | Radius [get, set] |
Mesh radius More... | |
Swimming fish.
Definition at line 282 of file Ecosystem.cs.
|
inline |
Create a swimming fish.
Definition at line 310 of file Ecosystem.cs.
|
inlineprotectedvirtual |
Update acceleration value.
Reimplemented from Forces.SimpleMover.
Definition at line 348 of file Ecosystem.cs.
Color Ecosystem.Ecosystem.SwimmingFish.BaseColor = Colors.CadetBlue |
Base color
Definition at line 288 of file Ecosystem.cs.
float Ecosystem.Ecosystem.SwimmingFish.ForwardAcceleration = 0.25f |
Forward acceleration
Definition at line 291 of file Ecosystem.cs.
float Ecosystem.Ecosystem.SwimmingFish.SideOffsetAcceleration = 0.1f |
Side offset acceleration
Definition at line 294 of file Ecosystem.cs.
float Ecosystem.Ecosystem.SwimmingFish.TailSpeed = 10f |
Tail speed
Definition at line 285 of file Ecosystem.cs.