public override string Apply() { MichaelCasey npc = GetComponent <MichaelCasey>(); FatherOwens owens = GameObject.Find("Father Owens _ 1").GetComponent <FatherOwens> (); if (queryName == "checkIsBusy") { if (npc.getBusy()) { return("true"); } else { return("false"); } } else if (queryName == "checkFirst") { if (owens.getFirstSermon()) { return("true"); } else { return("false"); } } else if (queryName == "checkSecond") { if (owens.getSecondSermon()) { return("true"); } else if (!owens.getSecondSermon() && (PlayerPrefs.GetInt("TimePassed") > 1500)) { return("listen"); } else { return("false"); } } else if (queryName == "checkBusyReset") { if (!owens.getSecondSermon() && (PlayerPrefs.GetInt("TimePassed") > 1500)) { return("true"); } else { return("false"); } } return("true"); }
public Action_Casey() : base(delegate(){ MichaelCasey n = GetComponent <MichaelCasey>(); if (actionName == "makeBusy") { n.setBusy(true); } else if (actionName == "makeNotBusy") { n.setBusy(false); } else if (actionName == "addRep") { n.setReputation(5); } else if (actionName == "subRep") { n.setReputation(-5); } }) {}