protected override void SetUpSchedules() { Task detectPlayer = new Task(new WaitTillPlayerCloseState(this, ref player)); TimeTask moveToForest = new TimeTask(50f, new MoveState(this, MapLocations.MiddleOfHauntedForestMiddle)); TimeTask moveToBridge = new TimeTask(50f, new MoveState(this, MapLocations.BridgeMiddle)); TimeTask moveToLightHouse = new TimeTask(50f, new MoveState(this, MapLocations.LightHouseMiddle)); TimeTask moveToReflectionTree = new TimeTask(50f, new MoveState(this, MapLocations.ReflectionTreeMiddle)); TimeTask moveToCliff = new TimeTask(50f, new MoveState(this, MapLocations.TopOfFirstFloorStairsRightMiddle)); TimeTask moveToWindmill = new TimeTask(50f, new MoveState(this, MapLocations.WindmillMiddle)); runAway = new ScheduleLoop(this); runAway.Add (moveToForest); runAway.Add (detectPlayer); runAway.Add (moveToBridge); runAway.Add (detectPlayer); runAway.Add (moveToLightHouse); runAway.Add (detectPlayer); runAway.Add (moveToReflectionTree); runAway.Add (detectPlayer); runAway.Add (moveToCliff); runAway.Add (detectPlayer); runAway.Add (moveToWindmill); wanderAndPlayMusic = new ScheduleLoop(this); wanderAndPlayMusic.Add (moveToForest); wanderAndPlayMusic.Add (moveToBridge); wanderAndPlayMusic.Add (moveToLightHouse); wanderAndPlayMusic.Add (moveToReflectionTree); wanderAndPlayMusic.Add (moveToCliff); wanderAndPlayMusic.Add (moveToWindmill); SetupInstrumentSchedules (); }
protected override void SetUpSchedules() { ScheduleLoop newDefaultSched = new ScheduleLoop(this, Schedule.priorityEnum.Default); newDefaultSched.Add(new Task(new FishState(this))); this.AddSchedule(newDefaultSched); treasureHuntSched = new SeaCaptainTreasureHuntSchedule(this); talkToFortuneTellerFirstSched = new NPCConvoSchedule(this, NPCManager.instance.getNPC(StringsNPC.FortuneTellerMiddle), new MiddleSeaCaptainFortuneTellerFirstConvo(), Schedule.priorityEnum.Medium, true); talkToFortuneTellerSecondSched = new NPCConvoSchedule(this, NPCManager.instance.getNPC(StringsNPC.FortuneTellerMiddle), new MiddleSeaCaptainFortuneTellerSecondConvo(), Schedule.priorityEnum.Medium, true); TalktoCarpenterSon = new NPCConvoSchedule(this, NPCManager.instance.getNPC(StringsNPC.CarpenterSonMiddle), new MiddleSeaCaptainToCarpenterSon(), Schedule.priorityEnum.DoConvo, true); TalktoCarpenterSon.SetCanNotInteractWithPlayer(); returnToDockSchedOne = new Schedule(this); returnToDockSchedOne.Add(new Task(new MoveThenMarkDoneState(this, startingPos))); returnToDockSchedTwo = new Schedule(this); returnToDockSchedTwo.Add(new Task(new MoveThenMarkDoneState(this, startingPos))); AfterTalkToCarpenterSon = new Schedule(this, Schedule.priorityEnum.High); Task FinishedTalking = new TimeTask(0.05f, new IdleState(this)); FinishedTalking.AddFlagToSet(FlagStrings.AfterConversationAboutBuildingShip); AfterTalkToCarpenterSon.Add (FinishedTalking); }
protected override void SetUpSchedules() { InitialSchedule = new ScheduleLoop(this, Schedule.priorityEnum.Medium); Task waitForPlayer = new Task(new WaitTillPlayerCloseState(this, ref player)); InitialSchedule.Add(waitForPlayer); Task SayHi = new Task(new AbstractAnimationState(this, "Hi"), this, 0.1f, "Psst! Come over here!"); InitialSchedule.Add(SayHi); InitialSchedule.Add(new Task(new WaitTillPlayerCloseState(this, ref player))); Task playWithSword = new Task(new AbstractAnimationState(this, "Play With Sword")); InitialSchedule.Add(playWithSword); AttemptToTellOnLighthouse = new NPCConvoSchedule(this, NPCManager.instance.getNPC(StringsNPC.FarmerFatherYoung), new LightHouseToFarmerFather(),Schedule.priorityEnum.DoConvo); AttemptToTellOnLighthouse.SetCanNotInteractWithPlayer(); tellOnLighthouseConversationSchedule = new NPCConvoSchedule(this, NPCManager.instance.getNPC(StringsNPC.LighthouseGirlYoung), new YoungFarmerMotherToLighthouseGirlToldOn(),Schedule.priorityEnum.DoConvo); Task SetFlagToBeach = (new Task(new MoveThenDoState(this, this.gameObject.transform.position, new MarkTaskDone(this)))); SetFlagToBeach.AddFlagToSet(FlagStrings.GoDownToBeach); TalkWithCastleman = new Schedule (this, Schedule.priorityEnum.DoNow); TalkWithCastleman.Add(new TimeTask(3000, new WaitTillPlayerCloseState(this, ref player))); Task setFlag = (new TimeTask(2f, new IdleState(this))); setFlag.AddFlagToSet(FlagStrings.StartTalkingToLighthouse); TalkWithCastleman.Add(setFlag); TalkWithCastleman.AddFlagGroup("TalkWithCastleman"); GaveApple = new Schedule(this, Schedule.priorityEnum.High); GaveApple.Add(new TimeTask(10f, new AbstractAnimationState(this, "Play With Sword"))); GaveApple.Add(SetFlagToBeach); //GaveApple.Add(new TimeTask(500f, new IdleState(this))); GaveNothingSchedule = new Schedule(this, Schedule.priorityEnum.High); GaveNothingSchedule.Add(new TimeTask(750f, new IdleState(this))); GaveNothingSchedule.Add(SetFlagToBeach); WalkToBeach = new Schedule(this, Schedule.priorityEnum.High); WalkToBeach.Add(new Task(new MoveThenMarkDoneState(this, MapLocations.MiddleOfBeachYoung))); Task setAtBeachFlag = new TimeTask(0f, new IdleState(this)); setAtBeachFlag.AddFlagToSet(FlagStrings.LighthouseAtBeach); WalkToBeach.Add(setAtBeachFlag); LighthouseGoingToBeach = new NPCConvoSchedule(this, NPCManager.instance.getNPC(StringsNPC.FarmerMotherYoung), new LighthouseToFarmerMother(),Schedule.priorityEnum.DoConvo, true); LighthouseGoingToBeach.SetCanNotInteractWithPlayer(); }