|
Post by jlock10 on Oct 31, 2023 15:10:08 GMT
How Do I call continuous damage to my character controller after a specific time? here is my script:
using System.Collections; using System.Collections.Generic; using Invector.vCharacterController; using UnityEngine; using UnityEngine.UI; namespace Invector.vCharacterController {
}
public class timebar: MonoBehaviour
{
public float CurrentTime; public float StartingTime; public timerbar; public GameObject Player; public
// Start is called before the first frame update void Start() { CurrentTime = StartingTime; }
// Update is called once per frame void Update() { CurrentTime -= 1 * Time.deltaTime; Debug.Log(CurrentTime);
if (CurrentTime == 0) {
} } }
/////psuedo cdoe /// need 2 floats /// compare 2 times current = start /// if time reaches 0 then script calls V Damage.
|
|