Skip to content

Commit

Permalink
add: change player items to zero when collide with gas
Browse files Browse the repository at this point in the history
  • Loading branch information
gjwj5505 committed Dec 17, 2024
1 parent c5f6299 commit e691cb2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Assets/SWPPT3/Scripts/Main/PlayerLogic/State/PlayerState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ public virtual void InteractWithProp(Player player, PropBase obstacle)
}
else if (obstacle is Gas)
{
foreach(PlayerStates playerState in System.Enum.GetValues(typeof(PlayerStates)))
{
player.Item[playerState] = 0;
}
player.TryChangeState(PlayerStates.Slime);
}
else if (obstacle is MagicCircle)
Expand Down

0 comments on commit e691cb2

Please sign in to comment.