示例#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;
 }