Beispiel #1
0
        protected override void OnEnable()
        {
            base.OnEnable();

            m_EnemyController.animator.Play(hashIdleState, 0, Random.value);

            SceneLinkedSMB <SpitterBehaviour> .Initialise(m_EnemyController.animator, this);
        }
Beispiel #2
0
        // Called automatically by Unity after Awake whenever the script is enabled.
        void OnEnable()
        {
            SceneLinkedSMB <PlayerController> .Initialise(m_Animator, this);

            m_Damageable = GetComponent <Damageable>();
            m_Damageable.IsInvulnerable = true;

            EquipMeleeWeapon(false);

            m_Renderers = GetComponentsInChildren <Renderer>();
        }
        protected override void OnEnable()
        {
            base.OnEnable();

            originalPosition = transform.position;

            meleeWeapon.SetOwner(gameObject);

            m_EnemyController.animator.Play(hashIdleState, 0, Random.value);

            SceneLinkedSMB <ChomperBehavior> .Initialise(m_EnemyController.animator, this);
        }
        protected override void OnEnable()
        {
            // needs to be called in order to set the damage receivers.
            base.OnEnable();

            m_NavMeshAgent = GetComponent <NavMeshAgent>();

            SceneLinkedSMB <GrenadierBehaviour> .Initialise(m_EnemyController.animator, this);

            fistWeapon.SetOwner(gameObject);
            fistWeapon.EndAttack();

            m_CoreMaterial         = coreRenderer.materials[1];
            m_OriginalCoreMaterial = m_CoreMaterial.GetColor("_Color2");

            m_EnemyController.animator.Play(hashIdleState, 0, Random.value);

            shield.SetActive(false);
        }