private void AddButtons() { if (buttonList == null) { buttonList = new List <CultButton>(); } for (int i = 0; i < cultList.Count; i++) { Cult cult = cultList[i]; CultButton button = Instantiate(buttonToSpawn); button.transform.SetParent(content.transform, false); button.transform.localPosition = Vector3.zero; button.Setup(cult, this); buttonList.Add(button); // var copy = Instantiate(itemTemplate); // copy.transform.SetParent(content.transform, false); // copy.transform.localPosition = Vector3.zero; // GameObject newButton = buttonObjectPool.GetObject(); // newButton.transform.SetParent(contentPanel); // CultButton button = newButton.GetComponent<CultButton>(); // button.Setup( cult, this ); } }
public void PopulateLicensePage(Deity deity, Cult cult) { CurrentCult = cult; CurrentDeity = deity; GodNameText.text = deity.GetName(); }
public void populateDetailsPanelByCustomer(Cult cult) { Debug.Log("" + cult.GetWorshipMethod()); currentCustomer = cult; CultWorshipMethod.text = "" + cult.GetWorshipMethod(); }
public void ConvertToCult() { Cult cult = JsonValue.StringToObject <Cult>( @"{ 'Name': 'Amazing Test Cult', 'Active': true, 'Leader': { 'name': 'Cult Leader', 'born': '7/4/1972' }, 'Followers': [ { 'name': 'Follower 1', 'born': '1/2/1979' }, { 'name': 'Follower 2', 'born': '3/4/1980' }, { 'name': 'Follower 3', 'born': '5/6/1981' } ] }".Replace('\'', '\"')); Assert.True(cult.Deserialized); Assert.Equal("Amazing Test Cult", cult.Name); Assert.True(cult.Active); Assert.Equal(3, cult.Followers.Count); Assert.Equal(new Person("Cult Leader", DateTime.Parse("7/4/1972")), cult.Leader); Assert.Equal(new Person("Follower 1", DateTime.Parse("1/2/1979")), cult.Followers[0]); Assert.Equal(new Person("Follower 2", DateTime.Parse("3/4/1980")), cult.Followers[1]); Assert.Equal(new Person("Follower 3", DateTime.Parse("5/6/1981")), cult.Followers[2]); }
public void populateDetailsPanel(Cult cult) { CurrentSelectedCult = cult; customerName.text = "Leader: " + cult.GetLeaderName(); customerSize.text = "Members: " + cult.GetSize(); preferredWorshipMethod.text = "Worship Method: " + cult.GetWorshipMethod(); }
public void Setup(Cult c, CultScrollList scrollList) { cult = c; cultName.text = cult.GetCultName(); cultScrollList = scrollList; button.onClick.AddListener(delegate { fillPanel(); }); }
public void GenerateCustomers() { int numCustomersToday = Random.Range(1, 5); for (int i = 0; i < numCustomersToday; i++) { Cult c = new Cult("new cult", WorshipMethod.Ritual, 30); customers.Add(c); } }
public void addCult(Cult c) { Debug.Log("Status #4: " + c.GetLeaderName()); if (worshippingCults == null) { worshippingCults = new List <Cult>(); } worshippingCults.Add(c); CalculateWorshipReceived(); }
public void Setup(Cult c, CustomerScrollList scrollList) { cult = c; customerName.text = cult.GetLeaderName(); // preferredWorshipMethod.text = c.GetWorshipMethod(); // cultSize.text = cult.GetSize().ToString(); customerScrollList = scrollList; detailsPanel = GameObject.Find("Customer Details Panel"); button.onClick.AddListener(delegate { fillPanel(); }); }
public IActionResult CreateCult(CreateCultViewModel model) { if (ModelState.IsValid) { var cult = new Cult(model); repository.Add(cult); return(RedirectToAction("list", "event")); } return(View("Create")); }
public EditCultViewModel(Cult cult) { Id = cult.Id; Date = cult.Date; NumberOfPeople = cult.NumberOfPeople; MainVerse = cult.MainVerse; Convertions = cult.Convertions; CultType = cult.CultType; InDoors = cult.Internal; PageTitle = "Editar Culto"; }
public static void InitMainMenu(Cult cult) { Menu = new World(cult); new MenuManager(Menu); new TextEntity("Inverseteroids", new Vector2f(220, 200), Menu, Fonts.ExoRegular, 60, Colors.White); new TextEntity("Press [Enter] to Play", new Vector2f(260, 260), Menu, Fonts.ExoRegular, 40, Colors.White); new TextEntity("Player 2", new Vector2f(564, 360), Menu, Fonts.ExoRegular, 18, Colors.White, Colors.Black); new TextEntity("Player 1", new Vector2f(200, 360), Menu, Fonts.ExoRegular, 18, Colors.White, Colors.Black); new Entity(Rsc.Tex("rsc/WADS.png"), new Vector2f(500, 400), Menu); new Entity(Rsc.Tex("rsc/Mouse.png"), new Vector2f(190, 400), Menu){Scale = new Vector2f(2.8f, 2.8f)}; new Entity(Rsc.Tex("rsc/Goat.png"), new Vector2f(0, 0), Menu); }
public LibraryCard(int cardID, string cardName, int attack, int atkRange, int health, int moveRange, int costs, Cult cult, Race race) { this.cardID = cardID; this.texture = null; this.cardName = cardName; this.cult = cult; this.race = race; this.costs = costs; this.attack = attack; this.health = health; this.moveRange = moveRange; this.atkRange = atkRange; }
public LibraryCard( int cardID, string cardName, int attack, int atkRange, int health, int moveRange, int costs, Cult cult, Race race) { this.cardID = cardID; this.texture = null; this.cardName = cardName; this.cult = cult; this.race = race; this.costs = costs; this.attack = attack; this.health = health; this.moveRange = moveRange; this.atkRange = atkRange; }
public void populateDetailsPanel(Cult cult) { CurrentSelectedCult = cult; DeityName.text = cult.getDeityName(); LeaderName.text = cult.GetLeaderName(); CultSize.text = "" + cult.GetSize(); WorshipMethod.text = " " + cult.GetWorshipMethod(); float faith = cult.GetFaith(); FaithSlider.value = faith; }
public static void InitUI(Cult cult) { UserInterface = new World(cult); new Entity(Rsc.Tex("rsc/UserInterface.png"), new Vector2f(0, 0), UserInterface); new Thrower(new Vector2f(10, 10), UserInterface); new SmallAsteroidSpawner(UserInterface); new MediumAsteroidSpawner(UserInterface); new LargeAsteroidSpawner(UserInterface); new GiantAsteroidSpawner(UserInterface); new UFOSpawner(UserInterface); new DangerManager(UserInterface); new Safety(); new TutorialManager(UserInterface); }
public void AddCult(Deity deity, Cult cult) { Debug.Log("cult is added to OM"); Debug.Log("Status #3: " + cult.GetLeaderName()); Cults.Add(cult); deity.addCult(cult); Customers.Remove(cult); UIManager.OnCustomerButton(); for (int i = 0; i < Deities.Count; i++) { Debug.Log("Number of worshippers for " + Deities[i].GetName() + ": " + Deities[i].GetWorshippingCults().Count); } }
public void ConvertSimpleNested() { Cult cult = JsonValue.StringToObject <Cult>( @"{ 'Name': 'Amazing Test Cult', 'Active': true, 'Leader': { 'name': 'Cult Leader', 'born': '7/4/1972' } }".Replace('\'', '\"')); Assert.True(cult.Deserialized); Assert.Equal("Amazing Test Cult", cult.Name); Assert.True(cult.Active); Assert.Equal(0, cult.Followers.Count); Assert.Equal(new Person("Cult Leader", DateTime.Parse("7/4/1972")), cult.Leader); }
protected void AddCult(Cult added) { int cult = cults.FindIndex(x => x.name == added.name); if (cult == -1) { cults.Add(added); } else { var newCults = cults[cult]; newCults.Change(added.val); cults[cult] = newCults; } cults.Sort(); }
public void WriteCult() { Cult cult = new Cult() { Active = true, EndDate = DateTime.Parse("10/11/2012"), Leader = new Person("Leader Person", DateTime.Parse("1/2/2003")), Name = "Funny cult", }; cult.Followers.Add(new Person("Person 1", DateTime.Parse("2/1/2002"))); cult.Followers.Add(new Person("Person 2", DateTime.Parse("4/3/2003"))); string text = JsonValue.ObjectToString(cult, formatted: false); Assert.Equal(@"{""Name"":""Funny cult"",""Active"":true,""EndDate"":""10/11/2012 00:00:00"",""Leader"":{""born"":""01/02/2003 00:00:00"",""name"":""Leader Person""},""Followers"":[{""born"":""02/01/2002 00:00:00"",""name"":""Person 1""},{""born"":""04/03/2003 00:00:00"",""name"":""Person 2""}]}", text); }
public void ConvertToNullable() { Cult cult1 = JsonValue.StringToObject <Cult>(@"{ ""EndDate"": ""1/2/1979"" }"); Cult cult2 = JsonValue.StringToObject <Cult>(@"{ ""EndDate"": null }"); Cult cult3 = JsonValue.StringToObject <Cult>(@"{ }"); Cult cult4 = JsonValue.StringToObject <Cult>(@"{ ""EndDate"": ""1/2/1979"", ""EndDate"": ""2/1/1979"" }"); Cult cult5 = JsonValue.StringToObject <Cult>(@"{ ""EndDate"": null, ""EndDate"": ""2/1/1979"" }"); Assert.True(cult1.EndDate.HasValue); Assert.False(cult2.EndDate.HasValue); Assert.False(cult3.EndDate.HasValue); Assert.True(cult4.EndDate.HasValue); Assert.True(cult5.EndDate.HasValue); Assert.Equal(DateTime.Parse("1/2/1979"), cult1.EndDate.Value); Assert.Equal(DateTime.Parse("2/1/1979"), cult4.EndDate.Value); Assert.Equal(DateTime.Parse("2/1/1979"), cult5.EndDate.Value); }
static void Main() { var cult = new Cult("Inversetroids") {ClearColor = Colors.Black}; Fonts.Init(); InitGame(cult); InitUI(cult); InitMainMenu(cult); InitGameOver(cult); cult.Undrawn = new World(cult); var music = new Music("rsc/music/Beat1.wav"); music.Play(); new Ticker(cult.Undrawn, music.Duration, delegate { music.Stop(); music.Play(); }); cult.CurrentWorld = Menu; cult.Run(); }
public void AttemptRecruitCandidate() { if (Conversation.Value == null) { return; } if (Conversation.Value.PersuasionLevel.Value >= Candidate.Value.PersuasionRequirement) { Cult.AddCandidate(Candidate.Value); Debug.Log("candidate Added"); Conclusion.Value = new ConversationConclusion(m_ConversationConlusionStrings, Candidate.Value, ConversationResult.Success); } else { Conclusion.Value = new ConversationConclusion(m_ConversationConlusionStrings, Candidate.Value, ConversationResult.Failure); } EndConversation(); }
public static string CultToString(LibraryCard.Cult cEnum) { string cult = null; switch ((int)cEnum) { case 0: cult = "greed"; break; case 1: cult = "envy"; break; case 2: cult = "wrath"; break; case 3: cult = "pride"; break; case 4: cult = "gluttony"; break; case 5: cult = "lust"; break; case 6: cult = "sloth"; break; } return(cult); }
public static void InitGameOver(Cult cult) { GameOver = new World(cult); new GameOver(GameOver); }
public static string CultToString(LibraryCard.Cult cEnum) { string cult = null; switch ((int)cEnum) { case 0: cult = "greed"; break; case 1: cult = "envy"; break; case 2: cult = "wrath"; break; case 3: cult = "pride"; break; case 4: cult = "gluttony"; break; case 5: cult = "lust"; break; case 6: cult = "sloth"; break; } return cult; }
public static void InitGame(Cult cult) { Game = new World(cult); new Ship((Points.GameBottomLeft + Points.GameTopRight)/2, Game); }
public bool removeCult(Cult c) { return(worshippingCults.Remove(c)); }
public CultDetailViewModel(Cult occasion, string pageTitle = "Detalhes do culto") { Cult = occasion; PageTitle = pageTitle; }