public static RequestConveyorBuildMessage Send(BuildList.Entry entry, BuildingMaterial hasMenu,
                                                       ConveyorBelt.ConveyorDirection direction)
        {
            var entryIndex = hasMenu.BuildList.Entries.ToList().IndexOf(entry);

            if (entryIndex == -1)
            {
                return(null);
            }

            var msg = new RequestConveyorBuildMessage
            {
                EntryIndex = (byte)entryIndex,
                Direction  = direction
            };

            msg.Send();
            return(msg);
        }
Exemple #2
0
 public void TryBuildBelt(int direction)
 {
     SoundManager.Play(SingletonSOSounds.Instance.Click01);
     CloseWindow();
     RequestConveyorBuildMessage.Send(entry, materials, (ConveyorBelt.ConveyorDirection)direction);
 }
 public void TryBuildBelt(int direction)
 {
     SoundManager.Play("Click01");
     CloseWindow();
     RequestConveyorBuildMessage.Send(entry, materials, (ConveyorBelt.ConveyorDirection)direction);
 }