예제 #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Create OnHand");

            var onHand = OnHand.Create(OnHandId.FromGuid(Guid.NewGuid()));

            Console.WriteLine($"OnHand: {onHand.State}");
            onHand.Stations.ToList().ForEach(e => Console.WriteLine($"{e.Id} - {e.StationName}"));
            Console.WriteLine();

            Console.WriteLine("Add Station");
            onHand.AddStation("TestStation");
            Console.WriteLine($"OnHand: {onHand.State}");
            onHand.Stations.ToList().ForEach(e => Console.WriteLine($"{e.Id} - {e.StationName}"));
            Console.WriteLine();

            Console.WriteLine("Add Station");
            onHand.AddStation("TestStation2");
            Console.WriteLine($"OnHand: {onHand.State}");
            onHand.Stations.ToList().ForEach(e => Console.WriteLine($"{e.Id} - {e.StationName}"));
            onHand.Stations.ToList().ForEach(e => e.Items.ToList().ForEach(i => Console.WriteLine($"Item: {i}")));

            Console.WriteLine();

            var station = onHand.Stations.First();

            Console.WriteLine("Add Item");
            onHand.AddItemToStation(station.Id.Value, Guid.NewGuid(), "Test Item");
            Console.WriteLine($"OnHand: {onHand.State}");
            onHand.Stations.ToList().ForEach(e => Console.WriteLine($"{e.Id} - {e.StationName}"));
            onHand.Stations.ToList().ForEach(e => e.Items.ToList().ForEach(i => Console.WriteLine($"Item: {i.Id} - {i.ItemName}")));

            Console.WriteLine();
            var events = onHand.GetChanges();

            foreach (var e in events)
            {
                Console.WriteLine($"{e}");
            }
        }
예제 #2
0
    private void Start()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(gameObject);
        }


        storeManager.ps4Amount        = 0;
        storeManager.xboxAmount       = 0;
        storeManager.galaxyS7Amount   = 0;
        storeManager.joystickAmount   = 0;
        storeManager.knackAmount      = 0;
        storeManager.lightSaberAmount = 0;
        storeManager.maskAmount       = 0;
        storeManager.ringAmount       = 0;
        storeManager.totalInBox       = 0;
        currentHand = 0;
    }