dronkowitz

RollDoor.cs

Oct 28th, 2021 (edited)
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class RollDoor : MonoBehaviour
  6. {
  7.     public GameObject powerCharacterTeamPull;
  8.     public Transform direction;
  9.     // Start is called before the first frame update
  10.     void Start()
  11.     {
  12.        
  13.     }
  14.  
  15.     // Update is called once per frame
  16.     void Update()
  17.     {
  18.        
  19.     }
  20.     public void Hit(UltimatePlayerMovement player)
  21.     {
  22.         StartCoroutine(LaunchPlayer(player));
  23.  
  24.     }
  25.  
  26.     private IEnumerator LaunchPlayer(UltimatePlayerMovement player)
  27.     {
  28.         player.SurrenderControl(Vector3.zero, 2.5f);
  29.  
  30.         yield return new WaitForSeconds(1);
  31.         player.Launch(direction.forward, 30);
  32.     }
  33. }
  34.  
Add Comment
Please, Sign In to add comment