Exemplo n.º 1
0
 public void Start()
 {
     engines = GetComponent<EngineSystem>();
     weaponSystem = GetComponent<WeaponSystem>();
     flightControls = new FlightControls(yawDamp, pitchDamp, rollDamp);
     engines.SetFlightControls(flightControls);
     flightControls.SetStickInputs(0f, 0f, 0f, startThrottle);
     EventManager.Instance.AddListener<Event_EntityDespawned>(OnEntityDespawned);
     PlayerManager.PlayerEventManager.AddListener<Event_EntityDamaged>(OnDamageTaken);
     cameraEye = GetComponentInChildren<CameraEye>();
 }
Exemplo n.º 2
0
 public virtual void Start()
 {
     entity = GetComponent<Entity>();
     engines = GetComponentInChildren<EngineSystem>();
     weaponSystem = GetComponent<WeaponSystem>();
     flightControls = new FlightControls();
     engines.SetFlightControls(flightControls);
     rigidbody = GetComponent<Rigidbody>();
     EventManager.Instance.AddListener<Event_EntityDespawned>(OnEntityDespawned);
     SelectWeapon();
 }