Advertisement
johnnygoodguy2000

PlayerDamagedInvincibility.cs

Jun 15th, 2024
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.52 KB | Gaming | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class PlayerDamagedInvincibility : MonoBehaviour
  6. {
  7.     [SerializeField] private float invincibilityDuration;
  8.     private InvincibilityController invincibilityController;
  9.  
  10.     private void Awake()        
  11.     {
  12.         invincibilityController = GetComponent<InvincibilityController>();
  13.     }
  14.  
  15.  
  16.     public void StartInvincibility()
  17.     {
  18.         invincibilityController.StartInvincibility(invincibilityDuration);
  19.        
  20.     }
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement