Beispiel #1
0
 public void SendPromotionGuyToPrison(PromotionGuy promotionGuy)
 {
     _promotionGuysInWild.Remove(promotionGuy);
     _aiManager.ChangeState(promotionGuy, typeof(PromotionGuy_Idle));
     promotionGuy.aiPath.Teleport(prisonTelerportPoint.position);
     _promotionGuysInPrison.Add(promotionGuy);
 }
    public override void OnEnter(object args = null)
    {
        Kid k = npc as Kid;

        k.PlayWalkAnimation();

        _followedPromotionGuy = args as PromotionGuy;
        npc.StartFollowing(_followedPromotionGuy.transform);
    }
Beispiel #3
0
    public void SpawnPromotionGuy()
    {
        // Get random spawn point.
        Transform randomSpawn = teleportPoints[Random.Range(0, teleportPoints.Count)];

        // Get promotion guy from prison.
        PromotionGuy promotionGuy = _promotionGuysInPrison[0];

        _promotionGuysInPrison.Remove(promotionGuy);

        // Teleport promotion guy to wild!
        _promotionGuysInWild.Add(promotionGuy);

        // Teleport!
        promotionGuy.aiPath.Teleport(randomSpawn.transform.position);

        // Start chasing a kid!
        _aiManager.ChangeState(promotionGuy, typeof(PromotionGuy_ChaseKid));
    }
 public override void OnExit()
 {
     _followedPromotionGuy = null;
     npc.StopFollowing();
 }