Ejemplo n.º 1
0
 public override void OnEnable()
 {
     base.OnEnable();
     mobMask     = LayerMask.GetMask("Walls", "NPC");
     coneOfSight = GetComponent <ConeOfSight>();
     mobAttack   = GetComponent <MobMeleeAttack>();
 }
Ejemplo n.º 2
0
 public override void OnEnable()
 {
     base.OnEnable();
     coneOfSight         = GetComponent <ConeOfSight>();
     doorMask            = LayerMask.GetMask("Door Open", "Door Closed", "Windows");
     doorAndObstacleMask = LayerMask.GetMask("Walls", "Machines", "Windows", "Furniture", "Objects", "Door Open",
                                             "Door Closed", "Players");
 }
Ejemplo n.º 3
0
 protected override void Awake()
 {
     mobMask     = LayerMask.GetMask("NPC");
     coneOfSight = GetComponent <ConeOfSight>();
     mobAttack   = GetComponent <MobMeleeAttack>();
     base.Awake();
     ResetBehaviours();
 }
Ejemplo n.º 4
0
 protected override void Awake()
 {
     hitMask        = LayerMask.GetMask("Players");
     playersLayer   = LayerMask.NameToLayer("Players");
     mobMeleeAction = GetComponent <MobMeleeAction>();
     coneOfSight    = GetComponent <ConeOfSight>();
     base.Awake();
 }
Ejemplo n.º 5
0
 protected override void Awake()
 {
     mobMask     = LayerMask.GetMask("NPC");
     coneOfSight = GetComponent <ConeOfSight>();
     base.Awake();
     dogName = mobName.ToLower();
     ResetBehaviours();
 }
Ejemplo n.º 6
0
 public override void OnEnable()
 {
     base.OnEnable();
     hitMask      = LayerMask.GetMask("Walls", "Players");
     playersLayer = LayerMask.NameToLayer("Players");
     mobAttack    = GetComponent <MobMeleeAttack>();
     coneOfSight  = GetComponent <ConeOfSight>();
 }
Ejemplo n.º 7
0
 public override void OnEnable()
 {
     base.OnEnable();
     mobMeleeAction = gameObject.GetComponent <MobMeleeAction>();
     hitMask        = LayerMask.GetMask("Players");
     playersLayer   = LayerMask.NameToLayer("Players");
     coneOfSight    = GetComponent <ConeOfSight>();
     PlayRandomSound();
 }
 public override void OnEnable()
 {
     base.OnEnable();
     hitMask        = LayerMask.GetMask("Players");
     playersLayer   = LayerMask.NameToLayer("Players");
     mobMeleeAttack = GetComponent <MobMeleeAttack>();
     coneOfSight    = GetComponent <ConeOfSight>();
     simpleAnimal   = GetComponent <SimpleAnimal>();
     PlayRandomSound();
 }
Ejemplo n.º 9
0
    void OnSceneGUI()
    {
        ConeOfSight fov = (ConeOfSight)target;

        Handles.color = Color.white;
        Handles.DrawWireArc(fov.transform.position, Vector3.up, Vector3.forward, 360, fov.viewRadius);
        Vector3 viewAngleA = fov.DirFromAngle(-fov.viewAngle / 2, false);
        Vector3 viewAngleB = fov.DirFromAngle(fov.viewAngle / 2, false);

        Handles.DrawLine(fov.transform.position, fov.transform.position + viewAngleA * fov.viewRadius);
        Handles.DrawLine(fov.transform.position, fov.transform.position + viewAngleB * fov.viewRadius);
    }
Ejemplo n.º 10
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();
        }
Ejemplo n.º 11
0
 public override void OnEnable()
 {
     base.OnEnable();
     mobMask     = LayerMask.GetMask("NPC");
     coneOfSight = GetComponent <ConeOfSight>();
 }