private void setPlayerState(int index, EquipmentCard equipment) { switch (equipment.tool) { case Tool.CART: if (equipment.getType() == CType.EQ_REPAIR) { this.playerStates[index].isDestroyedCart = false; } else { this.playerStates[index].isDestroyedCart = true; } break; case Tool.LATTERN: if (equipment.getType() == CType.EQ_REPAIR) { this.playerStates[index].isDestroyedLantern = false; } else { this.playerStates[index].isDestroyedLantern = true; } break; case Tool.PICKAXE: if (equipment.getType() == CType.EQ_REPAIR) { this.playerStates[index].isDestroyedPickaxe = false; } else { this.playerStates[index].isDestroyedPickaxe = true; } break; } }
private void setEquipmentIcon(int index, EquipmentCard equipment) { this.Invoke((MethodInvoker)(() => { if (equipment.getType() == CType.EQ_REPAIR) { this.toolIcons[equipment.tool][index].Visible = false; } else { this.toolIcons[equipment.tool][index].Visible = true; } })); }