当前位置: 首页>>代码示例>>C#>>正文


C# Schedule.Add方法代码示例

本文整理汇总了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);
 }
开发者ID:,项目名称:,代码行数:8,代码来源:

示例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);
    }
开发者ID:,项目名称:,代码行数:39,代码来源:

示例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();
    }
开发者ID:,项目名称:,代码行数:16,代码来源:

示例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")));
    }
开发者ID:,项目名称:,代码行数:8,代码来源:


注:本文中的Schedule.Add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。