void InitializeMoveStats() { PeasantStats ps = GetComponent <PeasantStats>(); _moveSpeed = ps.moveSpeed; _reachedLocRadius = ps.reachLocRadius; }
void UseBuilding(PeasantStats stats) { BuildingAffect[] affects = GetComponents <BuildingAffect>(); foreach (BuildingAffect affect in affects) { var rc = affect.Affect(); rc.amount = Mathf.CeilToInt(rc.amount * stats.ResourceBonus((int)rc.resource)); resourceEvent.Invoke(rc); } }