本文整理汇总了C#中Schedule.Add方法的典型用法代码示例。如果您正苦于以下问题:C# Schedule.Add方法的具体用法?C# Schedule.Add怎么用?C# Schedule.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Schedule
的用法示例。
在下文中一共展示了Schedule.Add方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetSchedule
protected override Schedule GetSchedule()
{
//Schedule schedule = new DefaultSchedule(this);
//return (schedule);
Schedule schedule = new Schedule(this, Schedule.priorityEnum.Low);
schedule.Add(new TimeTask(120f, new AbstractAnimationState(this, currentIdlePose)));
return (schedule);
}
示例2: SetUpSchedules
protected override void SetUpSchedules()
{
BeginDayChat = new NPCConvoSchedule(this, NPCManager.instance.getNPC(StringsNPC.CarpenterYoung), new YoungCarpenterSonToCarpenterConvo());
BeginDayChat.SetCanInteract(false);
BeginDayWithDad = new Schedule(this, Schedule.priorityEnum.DoNow);
TimeTask BeginDayTimeTask = new TimeTask(10, new WaitTillPlayerCloseState(this, ref player));
BeginDayTimeTask.AddFlagToSet(FlagStrings.carpenterSonYoungConvoWithDadFinished);
BeginDayWithDad.Add(BeginDayTimeTask);
this.AddSchedule(BeginDayWithDad);
this.AddSchedule(BeginDayChat);
TalkWithCastleman = new Schedule (this, Schedule.priorityEnum.High);
TalkWithCastleman.Add(new TimeTask(300, new WaitTillPlayerCloseState(this, ref player)));
Task setFlag = (new TimeTask(2f, new IdleState(this)));
setFlag.AddFlagToSet(FlagStrings.InitialConversationWithCSONFriend);
TalkWithCastleman.Add(setFlag);
TalkWithCastleman.AddFlagGroup("CSONMEETCASTLEMAN");
TalkWithCastlemanNotFriend = new Schedule (this, Schedule.priorityEnum.High);
TalkWithCastlemanNotFriend.Add(new TimeTask(300, new WaitTillPlayerCloseState(this, ref player)));
Task setFlagNOT = (new TimeTask(2f, new IdleState(this)));
setFlagNOT.AddFlagToSet(FlagStrings.InitialConversationWithCSONNOTFriend);
TalkWithCastlemanNotFriend.Add(setFlagNOT);
TalkWithCastleman.AddFlagGroup("CSONMEETCASTLEMAN");
Woodworking = new Schedule( this, Schedule.priorityEnum.Medium);
//Woodworking.Add (new TimeTask(300, new WaitState(this)));
Task whittleTask = new TimeTask(30, new AbstractAnimationState(this, "Whittle"));
whittleTask.AddFlagToSet(FlagStrings.carpenterSonYoungCompletedWhittling);
whittleSchedule = new Schedule(this, Schedule.priorityEnum.DoNow);
whittleSchedule.SetCanInteract(false);
whittleSchedule.Add(whittleTask);
Task whittleDoneTask = new Task(new IdleState(this));
whittleDoneSchedule = new Schedule(this, Schedule.priorityEnum.Medium);
whittleDoneSchedule.SetCanInteract(true);
whittleDoneSchedule.Add(whittleDoneTask);
}
示例3: SetupPrimaryCarpentrySchedules
private void SetupPrimaryCarpentrySchedules()
{
afterHappyForSonBeingACarpenter = new Schedule(this, Schedule.priorityEnum.Medium);
Task stormOffToWindmill = new Task(new MoveState(this, MapLocations.WindmillMiddle));
TimeTask workOnWindmill = new TimeTask(1000f, new AbstractAnimationState(this, "Hammer", true, true));
afterHappyForSonBeingACarpenter.Add(stormOffToWindmill);
afterHappyForSonBeingACarpenter.Add(workOnWindmill);
talkToSonAfterWhittle = new NPCConvoSchedule(this,
NPCManager.instance.getNPC(StringsNPC.CarpenterSonMiddle), new MiddleCarpenterToSonCarpentryScriptedConvo(), Schedule.priorityEnum.Low);
talkToSonAfterWhittle.SetCanNotInteractWithPlayer();
talkToSonWithoutWhittle = new NPCConvoSchedule(this,
NPCManager.instance.getNPC(StringsNPC.CarpenterSonMiddle), new MiddleCarpenterToSonCarpentryScriptedConvo(), Schedule.priorityEnum.Low);
talkToSonWithoutWhittle.SetCanNotInteractWithPlayer();
}
示例4: SetupInstrumentSchedules
void SetupInstrumentSchedules()
{
playHarpInstrument = new Schedule(this);
playHarpInstrument.Add(new Task(new AbstractAnimationState(this, "Playing Harp")));
playFluteInstrument = new Schedule(this);
playHarpInstrument.Add(new Task(new AbstractAnimationState(this, "Playing Flute")));
}