revival/game/Assets/Scripts/Player/PlayerPowers.cs

30 lines
701 B
C#
Raw Normal View History

2021-02-15 19:09:32 +01:00
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerPowers : MonoBehaviour
{
[Header( "Cheats" )]
[SerializeField]
private bool _cheatBlink;
[SerializeField]
private bool _cheatBoost;
[Header( "References" )]
[SerializeField]
private PlayerPower _blink;
[SerializeField]
private PlayerPower _boost;
public PlayerPower Blink => _blink;
public PlayerPower Boost => _boost;
public void UpdatePowers( float dt, bool grounded )
{
_blink.UpdatePower( dt, _cheatBlink, grounded );
_boost.UpdatePower( dt, _cheatBoost, grounded );
}
}