Skip to content

Commit

Permalink
fix: 🐛 add debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
panxuc committed Mar 30, 2024
1 parent cc7a297 commit ee907a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions logic/GameClass/GameObj/Map/Map.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ public bool RemoveJustFromMap(GameObj gameObj)
public void Add(IGameObj gameObj)
{
GameObjDict[gameObj.Type].Add(gameObj);
Debugger.Output("Found a " + gameObj.Type.ToString() + " at " + gameObj.Position.ToString());
}
public Map(MapStruct mapResource)
{
Expand Down
1 change: 1 addition & 0 deletions logic/GameClass/GameObj/Ship.cs
Original file line number Diff line number Diff line change
Expand Up @@ -450,5 +450,6 @@ public Ship(int initRadius, ShipType shipType, MoneyPool moneyPool) :
ModuleFactory.FindIShield(ShipType, shieldType),
ModuleFactory.FindIWeapon(ShipType, weaponType)
);
Debugger.Output(this, "Ship created");
}
}
4 changes: 2 additions & 2 deletions logic/Gaming/AttackManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@ public bool Attack(Ship ship, double angle)
}
if (bullet != null)
{
Debugger.Output($"playerID:{ship.ID} successfully attacked!");
Debugger.Output($"Player {ship.PlayerID} from Team {ship.TeamID} successfully attacked!");
return true;
}
else
{
Debugger.Output($"playerID:{ship.ID} failed to attack!");
Debugger.Output($"Player {ship.PlayerID} from Team {ship.TeamID} failed to attack!");
return false;
}
}
Expand Down

0 comments on commit ee907a5

Please sign in to comment.