//the first element should be subscribed to the network node for incoming messages, then use this static collection to direct it to the correct script //Don't change the rigidbody mass from 1 to change speed/agility; change accel and maxSpeed instead //the rigidbody mass(es) generally only affect how collisions happen // Use this for initialization void Awake() { rigid = GetComponent <Rigidbody2D>(); _maxSpeed = new FloatStatTracker(initMaxSpeed); _accel = new FloatStatTracker(initAccel); _mass = new FloatStatTracker(rigid.mass, () => rigid.mass = _mass.value); }
public static void RegisterFloatStat(FloatStatTracker sst) { floatStatMap.Add(sst.StatName, sst); }
public FloatStat(float val, FloatStatTracker.Recalculate update) { _value = val; this.update = update; }