void Update() { if (Input.GetKeyDown(KeyCode.N)) { NotificationSystem.DisplayNotification("Notify"); } }
public void SelectEnemy() { if (CharacterModel.Instance.Characters.NPCs.Count == 0) { NotificationSystem.DisplayNotification("You must create at least one NPC to create an opposed test."); return; } DropdownWindow.ShowDropdown( CharacterModel.Instance.Characters.NPCs.Select(c => c.Name).ToList(), npc => Opponent = CharacterModel.Instance.Characters.NPCs.Find(c => c.Name == npc), CharacterModel.Instance.Characters.NPCs.IndexOf(Opponent)); }
public void CreateTest() { var message = Success ? $"Created new success test for {Skill}" : $"Created new oppoesed test for {Skill} against {Opponent?.Name}'s {OpponentSkill}"; var opponentSkillValue = 0; var opponentPairedAttributeValue = 0; if (OpponentSkill == "Dodge") { foreach (var a in Opponent.Attributes) { if (a.Name == "Reaction" || a.Name == "Intuition") { opponentSkillValue += a.Value; } } opponentPairedAttributeValue = 0; } else { opponentSkillValue = Opponent?.Skills.Find(s => s.Name == OpponentSkill)?.Value ?? 0; opponentPairedAttributeValue = Opponent?.Attributes.Find(a => a.Name == CharacterModel.SkillNamesToRelatedAttrs[OpponentSkill])?.Value ?? 0; } var opponentTotalDamage = 0; if (Opponent != null) { opponentTotalDamage = Opponent.Damage + Opponent.Stun; } FeedModel.Instance.AddMessage( "GM", message, new TestData { PlayerSkill = Skill, OpponentSkill = OpponentSkill, OpponentName = Opponent?.Name, OpponentSkillValue = opponentSkillValue, OpponentTotalDamage = opponentTotalDamage, OpponentPairedAttributeValue = opponentPairedAttributeValue, SkillThreshold = Threshold }, send: true); PanelStack.Instance.PopPanel(); NotificationSystem.DisplayNotification("Test Created"); }