private void FixedUpdate() { if (heartsToGrant > 0) { companion.hearts++; --heartsToGrant; } int progress = companion.hearts - HeartUtility.HeartsRequired(companion.heartLevel); int goal = HeartUtility.HeartsRequired(companion.heartLevel + 1) - HeartUtility.HeartsRequired(companion.heartLevel); relationshipProgressBar.Set(progress, goal); relationshipLevelLabel.text = companion.heartLevel.ToString(); if (companion.heartLevel == HeartUtility.maxHeartLevel) { relationshipLevelLabel.color = relationshipMaxLabel.color; relationshipMaxLabel.gameObject.SetActive(true); } else { relationshipLevelLabel.color = Color.white; relationshipMaxLabel.gameObject.SetActive(false); } giftSection.SetActive(gifts != null && heartsToGrant == 0); verdictSection.SetActive(gifts != null && heartsToGrant == 0); if ((!string.IsNullOrEmpty(partingSpeech)) && (heartsToGrant == 0)) { speechText.text = partingSpeech; } }
static int Set(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2) { UIProgressBar obj = (UIProgressBar)ToLua.CheckObject <UIProgressBar>(L, 1); float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); obj.Set(arg0); return(0); } else if (count == 3) { UIProgressBar obj = (UIProgressBar)ToLua.CheckObject <UIProgressBar>(L, 1); float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); bool arg1 = LuaDLL.luaL_checkboolean(L, 3); obj.Set(arg0, arg1); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: UIProgressBar.Set")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int Set(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 3); UIProgressBar obj = (UIProgressBar)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UIProgressBar"); float arg0 = (float)LuaScriptMgr.GetNumber(L, 2); bool arg1 = LuaScriptMgr.GetBoolean(L, 3); obj.Set(arg0, arg1); return(0); }
public void FixedUpdate() { if (enemy != null) { attackLabel.text = enemy.attack.ToString(); defenseLabel.text = enemy.defense.ToString(); speedLabel.text = enemy.speed.ToString(); healthBar.Set(enemy.health, enemy.character.maxHealth); } }
private void Update() { verdictSection.SetActive(currentCompanionCard != null); searchForMoreCompanionsButton.SetActive(currentCompanionCard == null && companionCards.Count == 0); energyBar.Set(Player.instance.energy, Player.instance.maxEnergy); if (currentCompanionCard != null) { acceptButton.SetActive(currentCompanionCard.companion.heartLevel < HeartUtility.maxHeartLevel); marryButton.SetActive(currentCompanionCard.companion.heartLevel == HeartUtility.maxHeartLevel); } }
static int Set(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); UIProgressBar obj = (UIProgressBar)ToLua.CheckObject(L, 1, typeof(UIProgressBar)); float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); bool arg1 = LuaDLL.luaL_checkboolean(L, 3); obj.Set(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static public int Set(IntPtr l) { try { UIProgressBar self = (UIProgressBar)checkSelf(l); System.Single a1; checkType(l, 2, out a1); System.Boolean a2; checkType(l, 3, out a2); self.Set(a1, a2); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
private void Update() { progressBar.Set(AdventureManager.instance.playerFighter.health, Player.instance.character.maxHealth); }