Beispiel #1
0
        private void TrySendChar(GameObject droppedChar, BlockType blockType)
        {
            BlockType lastLocation = droppedChar.GetComponent <CharInListView>().CharModel.Location;

            if (blockType == lastLocation)
            {
                AlertController.ShowAlert("This human is already here");
                return;
            }

            bool success = SendChar(droppedChar, blockType);

            if (success)
            {
                shipController.ApplyBlockEffect(new BlockEffect()
                {
                    BlockType = lastLocation, PeopleCount = -1
                });
                OnSendChar?.Invoke(droppedChar, lastLocation);
            }
            else
            {
                AlertController.ShowAlert("No available rooms in this block");
            }
        }
Beispiel #2
0
 public void ViewCharsInBlock(BlockType bType)
 {
     if (bType != BlockType.Reactor)
     {
         BlocksPanel.SetActive(false);
         poolView.ViewChars(bType);
         ColonistScrollView.SetActive(true);
         UpdateModel();
     }
     else
     {
         AlertController.ShowAlert("You have burned "
                                   + Models.SpaceShip.Reactor.PeopleCount
                                   + " humans\n(╯°□°)╯");
     }
 }
Beispiel #3
0
        private void CheckStatus(int stat, Stats.Type statType)
        {
            if (stat < stats.Limits[statType])
            {
                string message = stats.GetRandomMessage(statType);

                if (!string.IsNullOrEmpty(message))
                {
                    AlertController.ShowAlert(stats.GetRandomMessage(statType));
                    stats.SetCanShowAlert(statType, false);
                }
            }
            else if (stat > stats.Limits[statType])
            {
                stats.SetCanShowAlert(statType, true);
            }
        }