private void drop() { float resMult = MetaScript.getGlobal_Stats().getGatherMultiplier(); curRes = (int)((float)curRes * resMult); MetaScript.getRes().addResource(this.findingType, curRes); curRes = 0; }
void combat() { Debug.Log("Combat Entered"); if (target != null) { animator.SetBool("attack", true); float damage = gameObject.GetComponent <Skills>().damage *MetaScript.getGlobal_Stats().getMilitaryAbility(); target.GetComponent <Health>().damage(Mathf.RoundToInt(damage)); } }
protected override void slow(GameObject victim) { if (!MetaScript.getGlobal_Stats().getHasHeatProtection()) { InBuilding shelterCheck = victim.GetComponent <InBuilding>(); if (shelterCheck == null || !shelterCheck.getPlayerInBuilding()) { buffsys.slowApplyingSystem(victim, slowDuration, slowDecimal); } } }
// Update is called once per frame void Update() { if (inCombat && timeControl) { StartCoroutine(combatManager()); } if (originalMultiplier < MetaScript.getGlobal_Stats().getAtkMultiplier()) { originalMultiplier = MetaScript.getGlobal_Stats().getAtkMultiplier(); damage = Mathf.RoundToInt(baseDamage * originalMultiplier); } }
void Update() { if (originalHealthMultiplier != MetaScript.getGlobal_Stats().getHealthMultiplier() && gameObject.tag == "OwnedNPC") { originalHealthMultiplier = MetaScript.getGlobal_Stats().getHealthMultiplier(); Debug.Log(originalHealthMultiplier); Debug.Log(MetaScript.getGlobal_Stats().getHealthMultiplier()); health = Mathf.RoundToInt(originalMaxHp * originalHealthMultiplier); maxHealth = health; } if (health <= 0 && !isImmortal) { death(); } }
// Update is called once per frame void Update() { bool isProtected = MetaScript.getGlobal_Stats().getHasColdProtection(); if (!isProtected) { timePassed += Time.deltaTime; if (timePassed >= tickTime) { timePassed = 0; heatExhaust(player); List <GameObject> NPCs = MetaScript.getMeta().GetComponent <OwnedNPCList>().getNPCs(); for (int i = 0; i < NPCs.Count; i++) { heatExhaust(NPCs[i]); } } } }
private void useFood() { float foodSaved = MetaScript.getGlobal_Stats().getFoodSaved(); int currentFood = resourceManager.getResource(ResourceTypes.FOOD); float foodCost = (ownedNPC.getCount() + 1) * foodUsedPerNPC - foodSaved; Debug.Log("Food used =" + foodCost); if (foodCost < 0) { foodCost = 0; } if (resourceManager.hasResource(ResourceTypes.FOOD, (int)foodCost)) { resourceManager.addResource(ResourceTypes.FOOD, (int)-foodCost); applyGlobalSlowRegen(); noFood = false; } else { resourceManager.addResource(ResourceTypes.FOOD, -currentFood); noFood = true; } }
// Use this for initialization void Start() { MetaScript.getGlobal_Stats().setMilitaryAbility(MetaScript.getGlobal_Stats().getMilitaryAbility() + militaryAbility); }
// Use this for initialization void Start() { MetaScript.getGlobal_Stats().setGatherMultiplier(multiplier * MetaScript.getGlobal_Stats().getBaseGather()); }
public override void removeStorm() { MetaScript.getMeta().GetComponent <Global_Stats>().setGatherMultiplier(MetaScript.getGlobal_Stats().getBaseGather()); Destroy(gameObject); }
// Use this for initialization void Start() { MetaScript.getGlobal_Stats().setBaseGather(MetaScript.getGlobal_Stats().getBaseGather() + gatherIncrease); }
// Use this for initialization void Start() { MetaScript.getGlobal_Stats().setAtkMultiplier(multiplierToAdd); }
// Use this for initialization void Start() { MetaScript.getGlobal_Stats().setHasColdProtection(true); }
// Use this for initialization void Start() { MetaScript.getGlobal_Stats().setFoodSaved(MetaScript.getGlobal_Stats().getFoodSaved() + foodConsumption); }