예제 #1
0
    protected override void Start()
    {
        base.Start();

        _holdingState      = GetComponent <PlayerHoldingState>();
        _animationSwitcher = GetComponent <AnimationSwitcher>();
        _gameOverlay       = GetComponent <GameOverlay>();
    }
예제 #2
0
    protected override void Start()
    {
        base.Start();

        _holdingState      = this.GetComponent <PlayerHoldingState>();
        _animationSwitcher = GetComponent <AnimationSwitcher>();
        _audioController   = GetComponent <AudioController>();
        _playerOverlay     = this.GetComponent <GameOverlay>();
    }
예제 #3
0
 public void PickupResource(ResourceType resourceType)
 {
     if (resourceType == ResourceType.Seed)
     {
         holdingState = PlayerHoldingState.Seed;
     }
     else if (resourceType == ResourceType.Water)
     {
         holdingState = PlayerHoldingState.Water;
         WaterCharges = maxWaterCharges;
     }
 }
예제 #4
0
    public void DropResource()
    {
        holdingState = PlayerHoldingState.Nothing;

        if (heldBaby != null)
        {
            var position = transform.position;
            position.x -= 1.0f;
            heldBaby.transform.position = position;
            heldBaby.WasDropped();
            heldBaby = null;
        }
    }
예제 #5
0
    protected override void Start()
    {
        base.Start();

        timeLeft = movementTimeLimit;   // Set the time that the user has to move to the movementTimeLimit

        _holdingState      = GetComponent <PlayerHoldingState>();
        _frozenState       = GetComponent <PlayerFrozenState>();
        _animationSwitcher = GetComponent <AnimationSwitcher>();
        _audioController   = GetComponent <AudioController>();
        _gameOverlay       = GetComponent <GameOverlay>();

        _holdingState.MaxRunWithBallTime = movementTimeLimit;
    }
예제 #6
0
    protected override void Start()
    {
        base.Start();

        _holdingState = GetComponent <PlayerHoldingState>();
    }
예제 #7
0
    protected override void Awake()
    {
        base.Awake();

        _holdingState = this.GetComponent <PlayerHoldingState>();
    }
예제 #8
0
 public void PickupBaby(BabyMovement babyMovement)
 {
     babyMovement.WasPickedUp();
     heldBaby     = babyMovement;
     holdingState = PlayerHoldingState.Baby;
 }