bool invulnerable; //Used to keep the player of getting hurt while they're already hurt. Basically this means that if hurt, the player can't be hurt again. If they were already hurt, of course. As in, the player can't get hurt while they are already hurt. //To put it more simply, the player can only get hurt if they are not currently hurt. This gives our depressed players an advantage, to make them feel better. Basically this means that the player CANNOT be hurt by an enemy or anything else as long as they //are already hurt, you feel me? It might make more sense if you think of it like this: I was very bored. Also please don't cancel me on twitter dot com if the depressed joke was made in poor taste, which it probably was. I'm bored, yo. That's not //an excuse for being rude though, I am very sorry. I've made a severe lapse in my judgement, and I don't expect to be forgiven. I'm simply here to apologize. I'm ashamed of myself. I’m disappointed in myself. And I promise to be better. I will be better. //Thank you. // Start is called before the first frame update void Start() { if (currentHP <= 0) { currentHP = maximumHP; } playerController = GetComponent <PlayerController>(); rb = GetComponent <Rigidbody>(); splineWalker = GetComponent <SplineWalker>(); if (FindObjectOfType <HPUI>() != null) { hpUI = FindObjectOfType <HPUI>(); hpUI.UpdateUI(currentHP, maximumHP, false); } }
protected override void Initialize() { GameDevice.Instance(Content, GraphicsDevice); mSceneManager = new SceneManager(); mSceneManager.Add(Scene.Scene.Title, new Title()); mSceneManager.Add(Scene.Scene.GamePlay, new GamePlay()); mSceneManager.Change(Scene.Scene.Title); mHPUI = new HPUI(); HitStop.mIsHitStop = false; GameDevice.Instance().GetRenderer().InitializeRenderTarget(Screen.WIDTH, Screen.HEIGHT); base.Initialize(); }