Skip to content

Instantly share code, notes, and snippets.

@HolyMonkey
Created July 1, 2021 18:52
Show Gist options
  • Save HolyMonkey/9290ed63c38fc732ed8f58693077095d to your computer and use it in GitHub Desktop.
Save HolyMonkey/9290ed63c38fc732ed8f58693077095d to your computer and use it in GitHub Desktop.
class Weapon
{
public int Damage;
public int Bullets;
public void Fire(Player player)
{
player.Health -= Damage;
Bullets -= 1;
}
}
class Player
{
public int Health;
}
class Bot
{
public Weapon Weapon;
public void OnSeePlayer(Player player)
{
Weapon.Fire(player);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment