private void Update() { if (this.GetComponent <Tameable>().IsHungry()) { ZNetScene.instance.Destroy(this.gameObject); } var weight = Traverse.Create(m_inventory).Field <float>("m_totalWeight").Value; if (weight > 0) { if (weight >= m_weight) { m_hum.ChangeSpeed(0.5f); return; } m_hum.ChangeSpeed((m_weight - weight) / m_weight * 1.5f + 0.5f); return; } m_hum.ChangeSpeed(2); }