Say I have three object types.
Player, weapon, bullet.
Then I want to have a variable in player for the currently used weapon, and a variable in weapon for the bullet type it uses.
example
player.weapon = lasergun
lasergun.bullet = laserbullet
if left click
player spawn player.weapon.bullet
How should i program these kinds of situations as simple as possible?