Revision | 656 (tree) |
---|---|
Zeit | 2011-01-14 16:56:48 |
Autor | massa_senohito |
Applyforce,ApplyImpulseの定義、オーバーロードを追加
@@ -62,6 +62,32 @@ | ||
62 | 62 | { |
63 | 63 | selfBody.ApplyForce(culcForce(power, angle), Center); |
64 | 64 | } |
65 | + /// <summary> | |
66 | + /// 力を加えます、作用点指定なしで重心へと力がかかります | |
67 | + /// </summary> | |
68 | + /// <param name="power"></param> | |
69 | + /// <param name="center"></param> | |
70 | + public void ApplyForce(Vec2 power, Vec2 center) | |
71 | + { | |
72 | + selfBody.ApplyForce(power, center); | |
73 | + } | |
74 | + public void ApplyForce(Vec2 power) | |
75 | + { | |
76 | + selfBody.ApplyForce(power, selfBody.GetWorldCenter()); | |
77 | + } | |
78 | + /// <summary> | |
79 | + /// 加速度を加えます、作用点指定なしで重心へと力がかかります | |
80 | + /// </summary> | |
81 | + /// <param name="power"></param> | |
82 | + /// <param name="center"></param> | |
83 | + public void ApplyImpulse(Vec2 power, Vec2 center) | |
84 | + { | |
85 | + selfBody.ApplyImpulse(power, center); | |
86 | + } | |
87 | + public void ApplyImpulse(Vec2 power) | |
88 | + { | |
89 | + selfBody.ApplyImpulse(power, selfBody.GetWorldCenter()); | |
90 | + } | |
65 | 91 | |
66 | 92 | /// <summary> |
67 | 93 | /// 物体を回転させます、正で時計回りに回転させます |