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 PlayerWeapons(Player player, Camera camera, PlayerController controller, IEnumerable<BasicWeaponMount> basicWeapons) { _player = player; _camera = camera; _controller = controller; _basicWeapons = basicWeapons; }
public PlayerCamera(Player player, Camera camera) { MovementDamp = 8.0f; _player = player; _camera = camera; }
public PlayerController(Player player) { MaxVariableVelocity = 20.0f; Acceleration = 70.0f; VelocityDamp = 20.0f; RotationSpeed = 0.03f; MouseSensitivity = new Vector2(700,700); UseRelativeMovement = false; AfterburnerModifier = 50.0f; StrafeModifier = 7.0f; _player = player; }
// Use this for initialization public void Start() { _currentWaypoint = FirstWaypoint; var waypoint = _currentWaypoint.Next; while(waypoint != null) { waypoint.gameObject.SetActive(false); waypoint = waypoint.Next; } _player = (Player)FindObjectOfType<Player>(); _levelManager = (LevelManager)FindObjectOfType<LevelManager>(); }
public void Awake() { _asteroids = new List<Asteroid>(); _player = (Player)FindObjectOfType<Player>(); _levelManager = (LevelManager)FindObjectOfType<LevelManager>(); }