Last active
September 10, 2023 11:59
-
-
Save Velsimir/8c3cc4eed330c08e3fd557f1a145ad17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Player | |
{ | |
readonly Weapon _weapon; | |
readonly Movement _movement; | |
public Player(string name, int age) | |
{ | |
Name = name; | |
Age = age; | |
_weapon = new Weapon(); | |
_movement = new Movement(); | |
} | |
public string Name { get; private set; } | |
public int Age { get; private set; } | |
public void Attack() | |
{ | |
//attack | |
} | |
} | |
class Weapon | |
{ | |
public float Cooldown { get; private set; } | |
public int Damage { get; private set; } | |
public bool IsReloading => throw new NotImplementedException(); | |
} | |
class Movement | |
{ | |
public float Speed { get; private set; } | |
public float DirectionX { get; private set; } | |
public float DirectionY { get; private set; } | |
public void Move() | |
{ | |
//Do move | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment