Exemplo n.º 1
0
    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;
    }
Exemplo n.º 2
0
    public override void Start(NPC_Commune npc)
    {
        base.Start(npc);

        Duration  = Random.Range(5, 10);
        TargetPos = NPC.CurrentPos;         // Flag to randomise next update
    }
Exemplo n.º 3
0
    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
    }
Exemplo n.º 4
0
    public override void Start(NPC_Commune npc)
    {
        base.Start(npc);

        Duration = 0;

        // Path towards the soil
        NPC.SetTargetCell(BuildableArea.GetCellFromPosition(SoilBush.gameObject));
    }
Exemplo n.º 5
0
    public override void Start(NPC_Commune npc)
    {
        base.Start(npc);

        Duration = 0;

        // Path towards the station
        NPC.SetTargetCell(BuildableArea.GetCellFromPosition(Workstation.PickupZone));
    }
Exemplo n.º 6
0
    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);
    }
Exemplo n.º 7
0
 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()
         );
 }
Exemplo n.º 8
0
    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);
    }
Exemplo n.º 9
0
    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);
    }
Exemplo n.º 10
0
    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);
    }
Exemplo n.º 11
0
    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);
    }
Exemplo n.º 12
0
 public virtual void Start(NPC_Commune npc)
 {
     NPC       = npc;
     Duration  = 0;
     StartTime = Time.time;
 }
Exemplo n.º 13
0
 public virtual bool IsAvailable(NPC_Commune npc)
 {
     return(false);
 }
Exemplo n.º 14
0
 public override bool IsAvailable(NPC_Commune npc)
 {
     // If party, must party
     return(CommuneToControllerBridge.Instance.IsParty);
 }
Exemplo n.º 15
0
 public override bool IsAvailable(NPC_Commune npc)
 {
     return(true);
 }
Exemplo n.º 16
0
    public override void Start(NPC_Commune npc)
    {
        base.Start(npc);

        Duration = NPC.MoveTime;
    }
Exemplo n.º 17
0
 public override bool IsAvailable(NPC_Commune npc)
 {
     return(npc.GetPersonalStory().GetWantsToTalk() && (Player_Commune.Instance.BeingTalkedAt == null));
 }