예제 #1
0
 public void SelectAuto()
 {
     if (choosedPacketType == PacketType.None)
     {
         choosedPacketType = PacketType.Default;
         choosedPacket     = allPackets.FirstOrDefault(s => s.packet == choosedPacketType);
         SaveChoosedPacket();
     }
 }
예제 #2
0
    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);
    }
예제 #3
0
 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.");
     }
 }
예제 #4
0
 public void DeselectPacket()
 {
     choosedPacketType = PacketType.None;
     choosedPacket     = null;
     SaveChoosedPacket();
 }