public PlayerWeapons(Player player, Camera camera, PlayerController controller, IEnumerable<BasicWeaponMount> basicWeapons) { _player = player; _camera = camera; _controller = controller; _basicWeapons = basicWeapons; }
public PlayerGUI(Player player, PlayerController controller) { _controller = controller; _player = player; _levelManager = (LevelManager)Object.FindObjectOfType<LevelManager>(); _velocityProgressBar = new ProgressBar { Size = new Vector2(250.0f, 10.0f), Position = new Vector2(10, Screen.height - 10 - 10), BackgroundColor = new Color(199.0f/255.0f,231.0f/255.0f,255.0f/255.0f), ForegroundColor = new Color(0.0f/255.0f, 145.0f/255.0f, 255.0f/255.0f) }; _healthProgressBar = new ProgressBar { Size = _velocityProgressBar.Size, Position = new Vector2(_velocityProgressBar.Position.x, _velocityProgressBar.Position.y - _velocityProgressBar.Size.y - 10.0f), BackgroundColor = new Color(255.0f/255.0f,199.0f/255.0f,208.0f/255.0f), ForegroundColor = new Color(194.0f/255.0f, 62.0f/255.0f, 62.0f/255.0f) }; _timeProgressBar = new ProgressBar { Size = new Vector2(Screen.width/2, 10), Position = new Vector2(((Screen.width/2) - (Screen.width /4)), 10), BackgroundColor = new Color(247.0f/255.0f, 247.0f/255.0f, 213.0f/255.0f), ForegroundColor = new Color(247.0f/255.0f, 244.0f/255.0f, 32.0f/255.0f) }; CurrentCursorSize = 20; }
public void Awake() { _camera = new PlayerCamera(this, Camera); _controller = new PlayerController(this); _playerGUI = new PlayerGUI(this, _controller); _mounts = GetComponentsInChildren<BasicWeaponMount>(); _weapons = new PlayerWeapons(this, Camera, _controller, _mounts); // Equip default weapon to all mounts Equip (BasicWeapon); }