Example #1
0
 protected override void Awake()
 {
     hitMask        = LayerMask.GetMask("Players");
     playersLayer   = LayerMask.NameToLayer("Players");
     mobMeleeAction = GetComponent <MobMeleeAction>();
     coneOfSight    = GetComponent <ConeOfSight>();
     base.Awake();
 }
Example #2
0
 public override void OnEnable()
 {
     base.OnEnable();
     mobMeleeAction = gameObject.GetComponent <MobMeleeAction>();
     hitMask        = LayerMask.GetMask("Players");
     playersLayer   = LayerMask.NameToLayer("Players");
     coneOfSight    = GetComponent <ConeOfSight>();
     PlayRandomSound();
 }
Example #3
0
        public override void OnEnable()
        {
            base.OnEnable();
            hitMask        = LayerMask.GetMask("Players");
            playersLayer   = LayerMask.NameToLayer("Players");
            mobMeleeAction = GetComponent <MobMeleeAction>();
            coneOfSight    = GetComponent <ConeOfSight>();
            simpleAnimal   = GetComponent <SimpleAnimal>();

            if (CustomNetworkManager.IsServer == false)
            {
                return;
            }
            PlayRandomSound();
        }