Example #1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
 }
Example #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);
     }
 }
Example #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;
             }
         }
     }
 }
Example #4
0
 protected virtual void ExitInteract(PlayerRaycastSystem p)
 {
     Debug.Log("Saliento de la interacción" + gameObject);
 }
Example #5
0
 protected virtual void EnterInteract(PlayerRaycastSystem p)
 {
     Debug.Log("Interactuando con: " + gameObject.name);
 }