Exemplo n.º 1
0
 public void CallExorcist(SpookItem targetItem)
 {
     if (!exorcistAtHome && Random.Range(1, 101) < ExorcistChance)
     {
         SpawnExorcist(targetItem);
     }
 }
Exemplo n.º 2
0
 void Update()
 {
     if (targetItem != null)
     {
         if (targetItem.GhostIsInRange)
         {
             targetItem.Activate();
             targetItem = null;
         }
     }
 }
Exemplo n.º 3
0
        public void Initialize(TransformRepository navigationSpots, Transform outside, SpookItem targetItem, Action exitCallback)
        {
            this.exitCallback    = exitCallback;
            this.navigationSpots = navigationSpots;
            this.outside         = outside;
            this.targetItem      = targetItem;
            currentSpookPoints   = InitialSpookPoints;

            GoToTarget();

            ArriveSfx.Play();
        }
Exemplo n.º 4
0
        private void SpawnExorcist(SpookItem targetItem)
        {
            exorcistAtHome = true;
            if (exorcist == null)
            {
                exorcist = Instantiate(ExorcistPrefab, NPCContainer);
                exorcist.transform.position = InvaderSpawnPoint.position;
                ActorRepository.AddNPC(exorcist);
            }

            exorcist.gameObject.SetActive(true);
            exorcist.Initialize(NavigationPoints, InvaderSpawnPoint, targetItem, ExorcistLeaves);
        }
Exemplo n.º 5
0
 private void MoveToPoint(Vector3 target, SpookItem targetItem)
 {
     ControlledNavigator.MoveTo(target, targetItem);
     MoveMarker.DisplayMarker(target);
 }
Exemplo n.º 6
0
 private bool IsInRange(SpookItem item) => item.GhostIsInRange;
Exemplo n.º 7
0
 private bool IsItem(SpookItem item) => item != null;
Exemplo n.º 8
0
 public void MoveTo(Vector3 targetPosition, SpookItem targetItem)
 {
     this.targetItem = targetItem;
     Agent.SetDestination(targetPosition);
 }
Exemplo n.º 9
0
 public void MoveTo(Vector3 targetPosition)
 {
     targetItem = null;
     Agent.SetDestination(targetPosition);
 }