// Use this for initialization void Start() { _characterRoster = new CharacterRoster(); timeAffectedObjects = new List <iAffectedByTime>(); _characterFactory = new AICharacterFactory(monoPool); characterDisplay.InitCharacterDisplay(); actionMenu.onButtonClick = UpdateCharacterDisplay; _mapGenerator.SetGm(this); _gameMap = _mapGenerator.generateMap(); _EndOfDayPannel.Init(_characterRoster, _gameMap); _EndOfDayPannel.startNextDay += StartDay; _EndOfDayPannel.SetUpNexDay(); this.CameraController.Init(_gameMap.GetTileAtRowAndColumn(0, 0).gameObject.GetComponent <Collider2D>().bounds.size); AddInGameClockToList(_clock); SortList(); EndDay(); }
public void chooseCharacters() { charRosterScript = Character_Roster.GetComponent <CharacterRoster>(); charRoster = Character_Roster.GetComponent <CharacterRoster>().CharArray; int charNum, rnd; teamCharArray = new Character[15]; Debug.Log("Now team " + teamNum + " will make their selection..."); for (int i = 0; i < 5; i++) { rnd = UnityEngine.Random.Range(1, 15); //pick rand character if (charRoster[rnd].picked == false) { teamCharArray[i] = charRoster[rnd]; charRosterScript.setPickedTrue(rnd); charNum = i + 1; Debug.Log("Team " + teamNum + " Character " + (charNum) + " is " + charRoster[rnd].first_name + " " + charRoster[rnd].last_name); } else if (charRoster[rnd].picked == true) { i--; // this will rerun loop. avoids duplicates } } }
public void Init(CharacterRoster characterRoster, Map map) { money = new Money(); money.Increment(10.00M); money.textRefrence = MoneyText; reputation = new Reputation(); reputation.textRefrence = ReputationText; StatsButton.StoredCommand = new ChangeEndOfDayState(this, _Stats); _Stats.ButtonForState = StatsButton; MapButton.StoredCommand = new ChangeEndOfDayState(this, _EditMap); _EditMap.ButtonForState = MapButton; _Supply.InitState(money, map); OrderSupplyButton.StoredCommand = new ChangeEndOfDayState(this, _Supply); _Supply.ButtonForState = OrderSupplyButton; startNextDay += _Supply.OnStartNextDay; _Schedule.InitState(money, characterRoster); scheduleButton.StoredCommand = new ChangeEndOfDayState(this, _Schedule); _Schedule.ButtonForState = scheduleButton; startNextDay += _Schedule.OnStartNextDay; _curState = _Stats; }
public CharacterRosterModel(CharacterRoster character) { //transform from business object to model Id = character.Id; Name = character.Name; Race = character.Race; Profession = character.Profession; }
public void setTeams() //activates other functions { cR = cRoster.GetComponent <CharacterRoster>(); cR.makeCharacters(); t1 = team1.GetComponent <Team>(); t1.chooseCharacters(); t2 = team2.GetComponent <Team>(); t2.chooseCharacters(); }
public void InitState(Money money, CharacterRoster roster) { moneyOnHand = money; _characterRoster = roster; foreach (StaffEntry s in staffEntries) { s.CheckTotal = ChangeMoneyBalance; s.GetCurrentValue = GetCurrentBalance; } labelList(); }
private void HandleCastMember(CharacterRoster cast, Emotions emotions) { var member = callSheet.Find(x => x.characterRoster == cast); if (!currentActor || currentActor.runtimeAnimatorController != member.animatorPrefab.runtimeAnimatorController) { if (currentActor) { Destroy(currentActor.gameObject); } currentActor = BuildCastMember(member.animatorPrefab); } SetCastEmotion(emotions); }
private bool IsDuplicate(CharacterRoster character) { IEnumerable <Product> lstProduct = _database.GetAll(); foreach (Product p in lstProduct) { if (p.Name.Equals(product.Name, StringComparison.OrdinalIgnoreCase) && p.Id != product.Id) { MessageBox.Show($"The {product.Name} has already been on Products", "Duplicate Name", MessageBoxButtons.OK); return(true); } } return(false); }
public ActionResult Save(CharacterRoster characterRoster, HttpPostedFileBase photo) { if (!ModelState.IsValid) { var viewModel = new CharacterRosterFormViewModel { CharacterRoster = characterRoster }; return(View("CharacterRosterForm", viewModel)); } var characterRosterInDb = _context.CharacterRosters.SingleOrDefault(c => c.Id == characterRoster.Id) ?? _context.CharacterRosters.Add(characterRoster); var characterRosterNnDbName = _context.CharacterRosters.SingleOrDefault(c => c.GameName == characterRoster.GameName); if (characterRosterNnDbName != null) { return(RedirectToAction("New")); } characterRosterInDb.GameName = characterRoster.GameName; var uploadHelper = new UploadHelper(Server); if (photo != null) { var filePath = uploadHelper.Upload(photo, nameof(CharacterRoster)); if (!string.IsNullOrEmpty(filePath)) { characterRosterInDb.ImagePath = filePath; } } _context.SaveChanges(); return(RedirectToAction("Index", "CharacterRostersAdmin")); }
void init() { instance = this; characterRoster = new CharacterRoster(); initPlayerUI(playerController1); }
private void Awake() { Instance = this; }
public async Task <ICollection <System.Windows.Forms.TreeNode> > GetCharacterRosterTreeNode(CharacterRoster frmCharRoster, bool forceUpdate) { //here you can add nodes to the character roster. return(null); }