예제 #1
0
        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;
        }
예제 #2
0
        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>();
        }
예제 #3
0
        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;
        }
예제 #4
0
        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);
        }