Last active
December 31, 2015 05:59
-
-
Save jonstvns/7944682 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IRequirement | |
{ | |
bool IsComplete {get; set;} | |
void OnRequirementEvent(IRequirementArgs args); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TalkArgs : IRequirementArgs | |
{ | |
public string npcName; | |
public TalkArgs() { } | |
public TalkArgs(string npcName) | |
{ | |
this.npcName = npcName; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TalkRequirement : IRequirement | |
{ | |
private string npcName; | |
public string NpcName { get { return npcName; } } | |
private bool isComplete = false; | |
public bool IsComplete | |
{ | |
get { return isComplete; } | |
set { isComplete = value; } | |
} | |
public TalkRequirement() { } | |
public TalkRequirement(string npcName) | |
{ | |
this.npcName = npcName; | |
} | |
public void OnRequirementEvent(IRequirementArgs args) | |
{ | |
if (args is TalkArgs) | |
{ | |
var talkArgs = (TalkArgs)args; | |
//Do Stuff | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment