public void SelectAuto() { if (choosedPacketType == PacketType.None) { choosedPacketType = PacketType.Default; choosedPacket = allPackets.FirstOrDefault(s => s.packet == choosedPacketType); SaveChoosedPacket(); } }
void Start() { //Kaydedilenleri geri al choosedPacketType = SaveAndLoadGameData.instance.savedData.choosedPacketType; ownedPackets = SaveAndLoadGameData.instance.savedData.ownedPackets; if (ownedPackets.Any(s => s == PacketType.Default) == false) { ownedPackets.Add(PacketType.Default); } choosedPacket = allPackets.FirstOrDefault(s => s.packet == choosedPacketType); }
public void SelectPacket(PacketType packet) { if (choosedPacketType == PacketType.None) { choosedPacketType = packet; choosedPacket = allPackets.FirstOrDefault(s => s.packet == choosedPacketType); SaveChoosedPacket(); } else { Debug.Log("A Packet is already choosed. You need to deselect it to select an other one."); } }
public void DeselectPacket() { choosedPacketType = PacketType.None; choosedPacket = null; SaveChoosedPacket(); }