예제 #1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
 }
예제 #2
0
 protected override void EnterInteract(PlayerRaycastSystem p)
 {
     base.EnterInteract(p);
     if (p.interactObject == this && Input.GetKeyDown(KeyCode.UpArrow) && Vector3.Distance(p.transform.position, transform.position) < 5f)
     {
         isOpenDoor = !isOpenDoor;
         animator.SetBool(isOpenHash, isOpenDoor);
     }
 }
예제 #3
0
 protected override void EnterInteract(PlayerRaycastSystem playerRaycast)
 {
     base.EnterInteract(playerRaycast);
     if (playerRaycast.interactObject == this)
     {
         if (Input.GetKeyUp(KeyCode.UpArrow) && _time > delay)
         {
             float teleportNeedUseAmount = costTeleport;
             _time = 0;
             Player p = playerRaycast.gameObject.GetComponent <Player>();
             if (playerRaycast.GetComponent <PortalNeed>().Spend(teleportNeedUseAmount))
             {
                 p.SetStatus(PlayerStatus.teleport);
                 p.SetTranstition(1f);
                 playerRaycast.gameObject.transform.position = this.spawnPoint.position;
             }
         }
     }
 }
예제 #4
0
 protected virtual void ExitInteract(PlayerRaycastSystem p)
 {
     Debug.Log("Saliento de la interacción" + gameObject);
 }
예제 #5
0
 protected virtual void EnterInteract(PlayerRaycastSystem p)
 {
     Debug.Log("Interactuando con: " + gameObject.name);
 }