本文整理汇总了C#中Task.AddFlagToSet方法的典型用法代码示例。如果您正苦于以下问题:C# Task.AddFlagToSet方法的具体用法?C# Task.AddFlagToSet怎么用?C# Task.AddFlagToSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Task
的用法示例。
在下文中一共展示了Task.AddFlagToSet方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
protected override void Init()
{
Add(new TimeTask(.25f, new IdleState(_toManage)));
Add(new Task(new MoveThenDoState(_toManage, new Vector3 (38f, -.7f, .3f), new MarkTaskDone(_toManage)))); // base of 1st floor stairs right
Add(new TimeTask(5f, new WaitTillPlayerCloseState(_toManage, ref _toManage.player)));
//Add(new Task(new MoveThenDoState(_toManage,(MapLocations._TopOfFirstFloorStairsRightYoung), new MarkTaskDone(_toManage)))); // top of 1st floor stairs right
//Add(new TimeTask(5f, new WaitTillPlayerCloseState(_toManage, _toManage.player)));
Add(new Task(new MoveThenDoState(_toManage, new Vector3 (37.8f, 7.5f, .3f), new MarkTaskDone(_toManage)))); // top of 1st floor stairs right
Add(new TimeTask(.25f, new IdleState(_toManage)));
Add(new TimeTask(5f, new WaitTillPlayerCloseState(_toManage, ref _toManage.player)));
//Add(new Task(new MoveThenDoState(_toManage, new Vector3 (45f, 7.4f, .3f), new MarkTaskDone(_toManage)))); // base of 2nd floor stairs right
//Add(new TimeTask(2f, new WaitTillPlayerCloseState(_toManage, _toManage.player)));
//Add(new Task(new MoveThenDoState(_toManage, new Vector3 (41f, 11f, .3f), new MarkTaskDone(_toManage)))); // middle of 2nd floor stairs
//Add(new TimeTask(2f, new WaitTillPlayerCloseState(_toManage, _toManage.player)));
//Add(new Task(new MoveThenDoState(_toManage, new Vector3 (46f, 16f, .3f), new MarkTaskDone(_toManage)))); // top of 2nd floor stairs
//Add(new TimeTask(5f, new WaitTillPlayerCloseState(_toManage, _toManage.player)));
Add(new Task(new MoveThenDoState(_toManage, new Vector3 (55f, 15.5f, .3f), new MarkTaskDone(_toManage)))); // Reached Destination: Farmer family
Add(new TimeTask(5f, new IdleState(_toManage)));
Task setOffMarketFlag = new Task(new MoveThenDoState(_toManage, new Vector3 (54f, 15.5f, .3f), new MarkTaskDone(_toManage))); // at top staircase
setOffMarketFlag.AddFlagToSet(FlagStrings.RunToMarket);
Add(setOffMarketFlag);
Add(new TimeTask(.2f, new IdleState(_toManage)));
//Add(new Task(new MoveThenDoState(_toManage, new Vector3 (75, 16f, .3f), new MarkTaskDone(_toManage))));
//Add(new TimeTask(20f, new IdleState(_toManage)));
}
示例2: GetSchedule
protected override Schedule GetSchedule()
{
#region reactivate after debugging <&^&>
//
Schedule schedule = new Schedule(this, Schedule.priorityEnum.DoNow);
schedule.Add(new TimeTask(1.25f, new IdleState(this)));
Task oldSiblingMoveToBridge = new Task(new MoveThenDoState(this, new Vector3(2f,Y_COORDINATE, .3f), new MarkTaskDone(this)));
oldSiblingMoveToBridge.AddFlagToSet(FlagStrings.oldSiblingIntroChatFlag);
schedule.Add(oldSiblingMoveToBridge);
schedule.Add(new TimeTask(5.5f, new IdleState(this)));
return (schedule);
//
#endregion
/*
Schedule schedule = new Schedule(this, Schedule.priorityEnum.DoNow);
schedule.Add(new TimeTask(1.25f, new IdleState(this)));
Task oldSiblingMoveToBridge = new Task(new MoveThenDoState(this, new Vector3(2f,Y_COORDINATE, .3f), new MarkTaskDone(this)));
oldSiblingMoveToBridge.AddFlagToSet(FlagStrings.oldSiblingIntroChatFlag);
schedule.Add(oldSiblingMoveToBridge);
schedule.Add(new TimeTask(.25f, new IdleState(this)));
return (schedule);
*/
}
示例3: SetUpSchedules
protected override void SetUpSchedules()
{
greetSiblingOldSchedule = (new CarpenterSonOldGreetSibllingSchedule(this));
goToBeachSchedule = (new CarpenterSonOldToBeachScript(this));
talkWhileFishingSchedule = new Schedule(this, Schedule.priorityEnum.DoNow);
talkWhileFishingSchedule.Add(new TimeTask(240f ,new WaitTillPlayerCloseState(this, ref this.player, 3f))); //
Task a = new TimeTask(.05f, new IdleState(this));
a.AddFlagToSet(FlagStrings.elderCarpenterSonChat);
talkWhileFishingSchedule.Add(a);
talkWhileFishingSchedule.Add(new Task (new IdleState(this)));
fishingSchedule = new Schedule(this, Schedule.priorityEnum.DoNow);
fishingSchedule.Add(new TimeTask(240f ,new WaitTillPlayerCloseState(this, ref this.player, 3f))); //
//fishingSchedule.Add(new Task(new AbstractAnimationState(this, currentWalkPose)));
fishingSchedule.Add(new TimeTask(20f, new IdleState(this))); //-3.5
Task b = new Task(new MoveThenDoState(this, new Vector3(74f, -3.5f + (LevelManager.levelYOffSetFromCenter*2), -.5f),new MarkTaskDone(this)));
b.AddFlagToSet(FlagStrings.elderCarpenterFishingTime);
fishingSchedule.Add(b);
fishingSchedule.Add(new Task(new AbstractAnimationState(this, currentFishingPose)));
fishingSchedule.Add(new Task (new IdleState(this)));
//talkWhileFishingSchedule
}