//apply pickup to Player void ApplyPickup(PlayerProperties playerStatus) { switch (pickupType) { case PickupType.Grow: if ((int)playerStatus.playerState == (int)PlayerProperties.PlayerState.PlayerSmall) { playerStatus.playerState = PlayerProperties.PlayerState.PlayerLarge; //change playerState to large if Player small playerStatus.changePlayer = true; //enable Player to change states } break; case PickupType.Coin: playerStatus.AddCoin(pickupValue); //add a coin to the current coin count break; case PickupType.ExtraLife: playerStatus.lives += pickupValue; //add a life to the current life amount break; } }