物理挙動を行うコンポーネントです。 現在は移動量のベクトルと減衰率を所有し、 それに応じた移動を行うのみ機能となっています。 [詳解]
#include <RigidBody2D.hpp>
公開メンバ関数 | |
void | Start () override |
void | Update () |
void | AddForce (Vector2D< double > _force) |
移動量を加算します | |
![]() | |
void | GameObj (GameObjBase *_obj) |
GameObjBase * | GameObj () |
string | ID () const |
void | ID (string _id) |
virtual ComponentBase * | GetThisComponent () |
virtual | ~ComponentBase () |
公開変数類 | |
Accessor< double > | Deceleration { &deceleration } |
減衰率 | |
非公開変数類 | |
Vector2D< double > | velocity |
double | deceleration = 0.97 |
その他の継承メンバ | |
![]() | |
string | id |
string | name |
GameObjBase * | gameObj |
物理挙動を行うコンポーネントです。 現在は移動量のベクトルと減衰率を所有し、 それに応じた移動を行うのみ機能となっています。
|
inlineoverridevirtual |
Kisaragi_Lib::ComponentBaseを再実装しています。
void Kisaragi_Lib::RigidBody2D::Update | ( | ) |
|
inline |
|
private |
参照元 AddForce(), Update().
|
private |
参照元 Update().
Accessor<double> Kisaragi_Lib::RigidBody2D::Deceleration { &deceleration } |
減衰率