private void OnEnterState() { ConstructionGhost.GhostState state = this.m_State; if (state != ConstructionGhost.GhostState.Dragging) { if (state != ConstructionGhost.GhostState.Building) { if (state == ConstructionGhost.GhostState.Ready) { this.CreateConstruction(); UnityEngine.Object.Destroy(base.gameObject); HUDGather.Get().Setup(); } } else { foreach (GhostStep ghostStep in this.m_Steps) { foreach (GhostSlot ghostSlot in ghostStep.m_Slots) { ghostSlot.Init(); } } this.SetupCurrentStep(); HUDGather.Get().Setup(); } } else { this.UpdateState(); } }
public void OnInventoryChanged() { this.CalculateCurrentWeight(); foreach (Item item in this.m_Items) { item.UpdatePhx(); item.UpdateScale(false); } HUDGather.Get().Setup(); HUDBackpack.Get().SetupPocket(Inventory3DManager.Get().m_ActivePocket); }