public override void Start() { _physics = GetComponent<CharacterPhysicsComponent>(); _manager = GetComponent<AbilityManager>(); // If not present in the current game object add it. if (_manager == null) _manager = AddComponent<AbilityManager>(); // Add ability to manager _manager.AddAbility(this, false); _timeSinceLastShot = FireRate; }
public override void Start() { _manager = GetComponent <AbilityManager>(); // If not present in the current game object add it. if (_manager == null) { _manager = AddComponent <AbilityManager>(); } // Add ability to manager _manager.AddAbility(this, true); _ownerStats = GetComponent <CharacterStats>(); }
public override void Start() { _physics = GetComponent <CharacterPhysicsComponent>(); _manager = GetComponent <AbilityManager>(); // If not present in the current game object add it. if (_manager == null) { _manager = AddComponent <AbilityManager>(); } // Add ability to manager _manager.AddAbility(this); // Hook into pre update GameObject.Scene.PreUpdate += preUpdate; }
public override void Start() { _physics = GetComponent <SpiritPhysicsComponent>(); if (_physics == null) { throw new ArgumentNullException("Spirits need a SpiritPhysicsComponent to work properly"); } _manager = GetComponent <AbilityManager>(); // If not present in the current game object add it. if (_manager == null) { _manager = AddComponent <AbilityManager>(); } // Add ability to manager _manager.AddAbility(this, true); }