示例#1
0
 public void AddEnemyToList(IAController iaController)
 {
     if (!listIA.Contains(iaController))
     {
         listIA.Add(iaController);
     }
 }
示例#2
0
 public void PlayerIsNotDetected(IAController guard)
 {
     if (listAlertedGuards.Contains(guard))
     {
         listAlertedGuards.Remove(guard);
     }
 }
        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);
            }
        }
示例#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);
 }
        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);
            }
        }