コード例 #1
0
ファイル: Evidence.cs プロジェクト: snoozbuster/ld28
 protected override void onKeypress(KeypressEventArgs eventArgs)
 {
     if (!Inactive && (eventArgs.Keypress == Keys.E || eventArgs.Gamepad.IsButtonDown(Buttons.X)))
     {
         string text = "This is the evidence you can use to blackmail August! Now you just have to find him.";
         SubtitleBox.AddMessage(text);
         (eventArgs.Sender as Player).UpdateProgressionData("hasblackmail", "true");
         Inactive = true;
     }
 }
コード例 #2
0
ファイル: Person.cs プロジェクト: snoozbuster/ld28
 protected override void onKeypress(KeypressEventArgs eventArgs)
 {
     if (!Inactive && canTalk && (eventArgs.Keypress == Keys.E || eventArgs.Gamepad.IsButtonDown(Buttons.X)) && eventArgs.Distance < talkDistance && text != null)
     {
         if (IsPolice && (eventArgs.Sender as Player).Morality < evilThreshold)
         {
             SubtitleBox.AddMessage(policeText, Name);
         }
         else if (IsGang && (eventArgs.Sender as Player).Morality > evilThreshold)
         {
             SubtitleBox.AddMessage(gangText, Name);
         }
         else
         {
             SubtitleBox.AddMessage(text, Name);
         }
         canTalk = false;
     }
 }
コード例 #3
0
 protected override void onKeypress(KeypressEventArgs eventArgs)
 {
     if (!talked)
     {
         if ((eventArgs.Sender as Player).HasProgressionData("hasblackmail"))
         {
             text   = hasEvidence;
             talked = true;
             SubtitleBox.AddMessage(text, Name, delegate { fading = true; });
             return;
         }
         else if (active)
         {
             text = attacking;
         }
         else
         {
             text = noEvidence;
         }
         base.onKeypress(eventArgs);
     }
 }