public void updateStatA(StatA stats) { if (statADisp == null) { Debug.LogError("StatA display not set"); } else { statADisp.setValues(stats.smart, stats.fertile, stats.unstable, stats.fast, stats.valuable); } }
void prepareToMove(MiteAttr attr) { statA = attr.statA; statB = attr.statB; rb = GetComponent <Rigidbody2D>(); rb.mass = W * (statB.heavy / statB.maxHeavy); rb.angularDrag = AWD * (statB.heavy / statB.maxHeavy); curStamina = attr.curStamina; mySpeedDelta = calcFlatSpeedDelta(0); myMaxSpeed = calcMaxSpeed(); Debug.Log(gameObject.name + " speedDelta:" + mySpeedDelta); }