コード例 #1
0
ファイル: ItemObject.cs プロジェクト: Gothen111/2DWorld
 public override void onCollide(AnimatedObject _CollideWith)
 {
     base.onCollide(_CollideWith);
     if (this.onlyFromPlayerTakeAble)
     {
         if (_CollideWith is PlayerObject)
         {
             ((PlayerObject)_CollideWith).addItemObjectToInventory(this);
         }
     }
     else
     {
         if (_CollideWith is CreatureObject)
         {
             ((CreatureObject)_CollideWith).addItemObjectToInventory(this);
         }
     }
 }
コード例 #2
0
ファイル: AnimatedObject.cs プロジェクト: Gothen111/2DWorld
 public virtual void onCollide(AnimatedObject _CollideWith)
 {
 }