public override void Start(NPC_Commune npc) { base.Start(npc); // Flag so only one npc can talk at a time Player_Commune.Instance.BeingTalkedAt = npc; }
public override void Start(NPC_Commune npc) { base.Start(npc); Duration = Random.Range(5, 10); TargetPos = NPC.CurrentPos; // Flag to randomise next update }
public override void Start(NPC_Commune npc) { base.Start(npc); // TODO wander around until near other people? or something? NPC.SetPos(new Point(BuildableArea.Instance.GridSquares / 8 * 5 + Random.Range(0, BuildableArea.Instance.GridSquares / 4), BuildableArea.Instance.GridSquares / 2 + Random.Range(0, BuildableArea.Instance.GridSquares / 4))); TargetPos = NPC.CurrentPos; // Flag to randomise next update }
public override void Start(NPC_Commune npc) { base.Start(npc); Duration = 0; // Path towards the soil NPC.SetTargetCell(BuildableArea.GetCellFromPosition(SoilBush.gameObject)); }
public override void Start(NPC_Commune npc) { base.Start(npc); Duration = 0; // Path towards the station NPC.SetTargetCell(BuildableArea.GetCellFromPosition(Workstation.PickupZone)); }
public override void Start(NPC_Commune npc) { base.Start(npc); // With timeout duration also Duration = Random.Range(5, 10); TargetPos = BuildableArea.GetCellFromPosition(GameObject.FindObjectOfType <CityTravelZone>().transform.position); NPC.SetIfNotTargetCell(TargetPos); }
public override bool IsAvailable(NPC_Commune npc) { // TODO leave if story segment is 3 and wants talk to player is false return( ((npc.GetPersonalStory().GetCurrentStage() == PersonalStory.PersonalGoals.PART_3) || (npc.GetPersonalStory().GetCurrentStage() == PersonalStory.PersonalGoals.PART_4)) && !CommuneToControllerBridge.Instance.IsParty && !npc.GetPersonalStory().GetWantsToTalk() ); }
public override bool IsAvailable(NPC_Commune npc) { List <Workstation> workable = new List <Workstation>(); foreach (var station in GameObject.FindObjectsOfType <Workstation>()) { if (station.Jams > 0) { workable.Add(station); } } if (workable.Count > 0) { Workstation = workable[Random.Range(0, workable.Count)]; return(true); } return(false); }
public override bool IsAvailable(NPC_Commune npc) { List <Workstation> workable = new List <Workstation>(); foreach (var station in GameObject.FindObjectsOfType <Workstation>()) { if (station.Berries >= Workstation.BERRIES_TO_JAM && station.Jams < Workstation.MAX_JAMS && station.AssignedNPC == null) { workable.Add(station); } } if (workable.Count > 0) { Workstation = workable[Random.Range(0, workable.Count)]; Workstation.AssignedNPC = npc; return(true); } return(false); }
public override bool IsAvailable(NPC_Commune npc) { List <SoilBush> plantable = new List <SoilBush>(); foreach (var tilledsoil in GameObject.FindObjectsOfType <SoilBush>()) { if (tilledsoil.CurrentStage == SoilBush.Stage.Tilled && tilledsoil.AssignedNPC == null) { plantable.Add(tilledsoil); } } if (plantable.Count > 0) { SoilBush = plantable[Random.Range(0, plantable.Count)]; SoilBush.AssignedNPC = npc; return(true); } return(false); }
public override bool IsAvailable(NPC_Commune npc) { List <SoilBush> gatherable = new List <SoilBush>(); foreach (var bush in GameObject.FindObjectsOfType <SoilBush>()) { if (bush.CurrentStage == SoilBush.Stage.Harvestable && bush.AssignedNPC == null) { gatherable.Add(bush); } } if (gatherable.Count > 0) { Bush = gatherable[Random.Range(0, gatherable.Count)]; Bush.AssignedNPC = npc; return(true); } return(false); }
public virtual void Start(NPC_Commune npc) { NPC = npc; Duration = 0; StartTime = Time.time; }
public virtual bool IsAvailable(NPC_Commune npc) { return(false); }
public override bool IsAvailable(NPC_Commune npc) { // If party, must party return(CommuneToControllerBridge.Instance.IsParty); }
public override bool IsAvailable(NPC_Commune npc) { return(true); }
public override void Start(NPC_Commune npc) { base.Start(npc); Duration = NPC.MoveTime; }
public override bool IsAvailable(NPC_Commune npc) { return(npc.GetPersonalStory().GetWantsToTalk() && (Player_Commune.Instance.BeingTalkedAt == null)); }