Esempio n. 1
0
 protected override void Awake()
 {
     hitMask        = LayerMask.GetMask("Players");
     playersLayer   = LayerMask.NameToLayer("Players");
     mobMeleeAction = GetComponent <MobMeleeAction>();
     coneOfSight    = GetComponent <ConeOfSight>();
     base.Awake();
 }
Esempio n. 2
0
 public override void OnEnable()
 {
     base.OnEnable();
     mobMeleeAction = gameObject.GetComponent <MobMeleeAction>();
     hitMask        = LayerMask.GetMask("Players");
     playersLayer   = LayerMask.NameToLayer("Players");
     coneOfSight    = GetComponent <ConeOfSight>();
     PlayRandomSound();
 }
Esempio n. 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();
        }