• R/O
  • SSH
  • HTTPS

nlgp1: Commit


Commit MetaInfo

Revision729 (tree)
Zeit2011-02-21 10:37:58
Autorbiikame

Log Message

Nlgp1.Sprites.Sprite.ToStringを修正

Ändern Zusammenfassung

Diff

--- trunk/Nlgp1/Nlgp1/Motions/SpriteMotion.cs (revision 728)
+++ trunk/Nlgp1/Nlgp1/Motions/SpriteMotion.cs (revision 729)
@@ -20,17 +20,17 @@
2020 /// </summary>
2121 /// <param name="layerType">レイヤの種類</param>
2222 /// <param name="imageTypeName">イメージディレクトリ名</param>
23- /// <param name="typeId">イメージID</param>
23+ /// <param name="typeID">イメージID</param>
2424 /// <param name="chipSize">イメージのサイズ</param>
2525 /// <returns></returns>
26- public static SpriteMotion Get( LayerType layerType , string imageTypeName , int typeId , Size chipSize ) {
26+ public static SpriteMotion Get( LayerType layerType , string imageTypeName , int typeID , Size chipSize ) {
2727 lock( caches ) {
2828 foreach( SpriteMotion m in caches ) {
29- if( m.ImageTypeName == imageTypeName && m.TypeID == typeId )
29+ if( m.ImageTypeName == imageTypeName && m.TypeID == typeID )
3030 return m;
3131 }
3232 }
33- return new SpriteMotion( layerType , imageTypeName , typeId , chipSize );
33+ return new SpriteMotion( layerType , imageTypeName , typeID , chipSize );
3434 }
3535 /// <summary>
3636 /// 読み込まれているすべてのスプライトのモーションを解放します。
@@ -46,22 +46,22 @@
4646
4747 private Dictionary<MotionType,MotionFrame> frame = new Dictionary<MotionType , MotionFrame>( Enum.GetNames( typeof( MotionType ) ).Length );
4848
49- private SpriteMotion( LayerType layerType , string imageTypeName , int typeId , Size chipSize ) {
49+ private SpriteMotion( LayerType layerType , string imageTypeName , int typeID , Size chipSize ) {
5050 lock( caches )
5151 caches.Add( this );
5252
5353 this.ImageTypeName = imageTypeName;
54- this.TypeID = typeId;
54+ this.TypeID = typeID;
5555 if( layerType == LayerType.Character ) {
56- this.ChipSet = GameMap.LoadChipGraphics( string.Format( @"Data\{0}\{1:D3}.png" , imageTypeName , typeId ) , chipSize );
56+ this.ChipSet = GameMap.LoadChipGraphics( string.Format( @"Data\{0}\{1:D3}.png" , imageTypeName , typeID ) , chipSize );
5757 if( this.ChipSet == null )
58- throw new NullReferenceException( string.Format( "{0} > {1} に対するチップセットを読み込めません。" , imageTypeName , typeId ) );
58+ throw new NullReferenceException( string.Format( "{0} > {1} に対するチップセットを読み込めません。" , imageTypeName , typeID ) );
5959
6060 foreach( var item in Enum.GetValues( typeof( MotionType ) ) )
6161 frame.Add( (MotionType)item , new MotionFrame() );
6262
6363 #region インデックス定義ファイルを読み込む
64- string defPath = Path.Combine( GameMap.RootPath , string.Format( @"Data\{0}\{1:D3}.def" , imageTypeName , typeId ) );
64+ string defPath = Path.Combine( GameMap.RootPath , string.Format( @"Data\{0}\{1:D3}.def" , imageTypeName , typeID ) );
6565
6666 if( File.Exists( defPath ) == false )
6767 defPath = Path.Combine( GameMap.RootPath , string.Format( @"Data\{0}\Common.def" , imageTypeName ) );
@@ -92,8 +92,8 @@
9292 this.ChipSet = GameMap.LoadChipGraphics( Path.Combine( "Data" , Path.ChangeExtension( imageTypeName , "png" ) ) , chipSize );
9393 foreach( MotionType type in Enum.GetValues( typeof( MotionType ) ) ) {
9494 frame.Add( type , new MotionFrame {
95- Start = typeId,
96- End = typeId,
95+ Start = typeID,
96+ End = typeID,
9797 } );
9898 }
9999 }
--- trunk/Nlgp1/Nlgp1/Sprites/Sprite.cs (revision 728)
+++ trunk/Nlgp1/Nlgp1/Sprites/Sprite.cs (revision 729)
@@ -50,7 +50,7 @@
5050 /// Spriteのコンストラクタ
5151 /// </summary>
5252 /// <param name="layerType">レイヤの種類</param>
53- /// <param name="typeId">識別ID</param>
53+ /// <param name="typeID">識別ID</param>
5454 /// <param name="spriteType">スプライトの属性</param>
5555 /// <param name="owner">スプライトの作成元</param>
5656 /// <param name="imageTypeName">使用するグラフィックフォルダ名</param>
@@ -57,11 +57,11 @@
5757 /// <param name="chipSize">スプライトのサイズ(最小=32x32)</param>
5858 /// <param name="debugID">デバッグ用 識別子 (通常使わない)</param>
5959 /// <param name="location">初期位置</param>
60- public Sprite( LayerType layerType , int typeId , SpriteType spriteType , ISprite owner , string imageTypeName , Size chipSize , string debugID , LocationF location ) {
60+ public Sprite( LayerType layerType , int typeID , SpriteType spriteType , ISprite owner , string imageTypeName , Size chipSize , string debugID , LocationF location ) {
6161 lock( objectList )
6262 objectList.Add( this );
6363
64- this.Motion = SpriteMotion.Get( layerType , imageTypeName , typeId , chipSize );
64+ this.Motion = SpriteMotion.Get( layerType , imageTypeName , typeID , chipSize );
6565 this.Owner = owner;
6666 this.Speed = new Speed();
6767 this.LogicParameter = new ActionParameter();
@@ -68,7 +68,7 @@
6868 this.Bounds = new Parameters.Bounds( this , new LocationF() , chipSize );
6969
7070 this.SpriteType = spriteType;
71- this.TypeID = typeId;
71+ this.TypeID = typeID;
7272 this.HitPoint = 1;
7373 Speed.MaxX = 5;
7474 Speed.MaxY = 12;
@@ -989,7 +989,7 @@
989989 return this.DebugID;
990990 }
991991 else {
992- return base.ToString();
992+ return string.Format( "{0}-{1}" , this.Owner , this.TypeID );
993993 }
994994 }
995995 #endregion
Show on old repository browser