~Linc~
~Linc~
CC#
Created by ~Linc~ on 5/9/2024 in #help
Can Someone help me fix this messy code and simplify it.
public List<Slot> FuelSlots = new List<Slot>(); public List<Slot> InputSlots = new List<Slot>(); public List<Slot> OutputSlots = new List<Slot>(); [Header("Furnace Slots")] public GameObject FuelSlotOne; public GameObject FuelSlotTwo; public GameObject InputSlotOne; public GameObject InputSlotTwo; public GameObject InputSlotThree; public GameObject OutputSlotOne; public GameObject OutputSlotTwo; public GameObject OutputSlotThree; private Slot FuelOne; private Slot FuelTwo; private Slot InputOne; private Slot InputTwo; private Slot InputThree; private Slot OutputOne; private Slot OutputTwo; private Slot OutputThree; private void Start() { FuelOne = FuelSlotOne.GetComponent<Slot>(); FuelTwo = FuelSlotTwo.GetComponent<Slot>(); InputOne = InputSlotOne.GetComponent<Slot>(); InputTwo = InputSlotTwo.GetComponent<Slot>(); InputThree = InputSlotThree.GetComponent<Slot>(); OutputOne = OutputSlotOne.GetComponent<Slot>(); OutputTwo = OutputSlotTwo.GetComponent<Slot>(); OutputThree = OutputSlotThree.GetComponent<Slot>(); }
9 replies