• R/O
  • SSH
  • HTTPS

nlgp1: Commit


Commit MetaInfo

Revision851 (tree)
Zeit2011-05-11 11:55:04
Autorbiikame

Log Message

Nlgp1.Characters.Character.Steppedに重力イベントを追加

Ändern Zusammenfassung

Diff

--- trunk/Nlgp1/Nlgp1/Characters/Character.cs (revision 850)
+++ trunk/Nlgp1/Nlgp1/Characters/Character.cs (revision 851)
@@ -69,6 +69,9 @@
6969 DownGravity = 2;
7070 JumpPower = 5;
7171 FlyGravity = 0.05f;
72+ this.Stepped += ( sender ,e ) => {
73+ this.Sprite.Body.ApplyForce( new Vector( 0, this.DownGravity ) );
74+ };
7275 }
7376
7477 /// <summary>
--- trunk/Nlgp1/Nlgp1/Parameters/SpriteBody.cs (revision 850)
+++ trunk/Nlgp1/Nlgp1/Parameters/SpriteBody.cs (revision 851)
@@ -85,10 +85,13 @@
8585 public void Load()
8686 {
8787 chara.MakeBody(Stage.World);
88- chara.Massdata = new MassData
88+ if (this.isMovable)
8989 {
90- Mass = 1,
91- };
90+ chara.Massdata = new MassData
91+ {
92+ Mass = 1,
93+ };
94+ }
9295 }
9396
9497 public void Unload()
Show on old repository browser