Ejemplo n.º 1
0
 public void AddEnemyToList(IAController iaController)
 {
     if (!listIA.Contains(iaController))
     {
         listIA.Add(iaController);
     }
 }
Ejemplo n.º 2
0
 public void PlayerIsNotDetected(IAController guard)
 {
     if (listAlertedGuards.Contains(guard))
     {
         listAlertedGuards.Remove(guard);
     }
 }
Ejemplo n.º 3
0
        public virtual void Start()
        {
            enemyController = gameObject.GetComponentInParent <EnemyController>();
            iaController    = gameObject.GetComponentInParent <IAController>();
            isfrozen        = false;

            this.meshRenderer            = GetComponent <MeshRenderer> ();
            this.meshFilter              = GetComponent <MeshFilter> ();
            this.mesh                    = new Mesh();
            this.meshFilter.sharedMesh   = mesh;
            this.isSecondFoV             = false;
            this.minVertexOffset         = 0f;
            this.maxDepth                = float.PositiveInfinity;
            this.minRange                = 0.1f;
            this.maxRange                = 180f;
            this.minMeshQuality          = 18;
            this.maxMeshQuality          = 2500;
            this.minUpdateRate           = 0.01f;
            this.detectedObjects         = new List <Transform> ();
            this.previousMeshQuality     = this.meshQuality;
            this.previousFovVertexOffset = this.fovVertexOffset;
            this.previousFovRange        = this.fovRange;
            this.previousFovDepth        = this.fovDepth;
            this.previousUpdateRate      = this.updateRate;
            this.previousInteractiveFOV  = this.interactiveFOV;
            this.nonInteractiveInit      = true;
            if (Application.isPlaying)
            {
                InvokeRepeating("DrawFoV", 0f, this.updateRate);
            }
        }
Ejemplo n.º 4
0
 public void PlayerIsDetected(IAController guard)
 {
     listShoutMarkers.Clear();
     if (listAlertedGuards.Contains(guard))
     {
         return;
     }
     else
     {
         listAlertedGuards.Add(guard);
     }
 }
 public void AddEnemyToList(IAController iaController)
 {
     if(!listIA.Contains(iaController))
         listIA.Add(iaController);
 }
 public void PlayerIsNotDetected(IAController guard)
 {
     if(listAlertedGuards.Contains(guard))
         listAlertedGuards.Remove(guard);
 }
 public void PlayerIsDetected(IAController guard)
 {
     listShoutMarkers.Clear();
     if(listAlertedGuards.Contains(guard))
         return;
     else
         listAlertedGuards.Add(guard);
 }
Ejemplo n.º 8
0
        public virtual void Start()
        {
            enemyController = gameObject.GetComponentInParent<EnemyController>();
            iaController = gameObject.GetComponentInParent<IAController>();
            isfrozen = false;

            this.meshRenderer = GetComponent<MeshRenderer> ();
            this.meshFilter = GetComponent<MeshFilter> ();
            this.mesh = new Mesh ();
            this.meshFilter.sharedMesh = mesh;
            this.isSecondFoV = false;
            this.minVertexOffset = 0f;
            this.maxDepth = float.PositiveInfinity;
            this.minRange = 0.1f;
            this.maxRange = 180f;
            this.minMeshQuality = 18;
            this.maxMeshQuality = 2500;
            this.minUpdateRate = 0.01f;
            this.detectedObjects = new List<Transform> ();
            this.previousMeshQuality = this.meshQuality;
            this.previousFovVertexOffset = this.fovVertexOffset;
            this.previousFovRange = this.fovRange;
            this.previousFovDepth = this.fovDepth;
            this.previousUpdateRate = this.updateRate;
            this.previousInteractiveFOV = this.interactiveFOV;
            this.nonInteractiveInit = true;
            if (Application.isPlaying)
            {
                InvokeRepeating ("DrawFoV", 0f, this.updateRate);
            }
        }