Exemplo n.º 1
0
    public override void OnEnter(object args = null)
    {
        Kid k = npc as Kid;

        k.PlayWalkAnimation();

        if (args is Player player)
        {
            _followedPlayer = player;

            // First add the kid as a new follower.
            _followedPlayer.AddFollower(npc as Kid);

            // Promo guy count should not exceed the follower kid count.
            if (!_isPromoGuySpawnedForThisKid)
            {
                _isPromoGuySpawnedForThisKid = true;
                _promotionGuyManager.SpawnPromotionGuy();
            }
        }
        else
        {
            _aiManager.ChangeState(npc, typeof(Kid_Idle));
        }
    }
Exemplo n.º 2
0
    public override void OnEnter(object args = null)
    {
        Kid k = npc as Kid;

        k.PlayWalkAnimation();

        _followedPromotionGuy = args as PromotionGuy;
        npc.StartFollowing(_followedPromotionGuy.transform);
    }