protected override void Start() { base.Start(); _holdingState = GetComponent <PlayerHoldingState>(); _animationSwitcher = GetComponent <AnimationSwitcher>(); _gameOverlay = GetComponent <GameOverlay>(); }
protected override void Start() { base.Start(); _holdingState = this.GetComponent <PlayerHoldingState>(); _animationSwitcher = GetComponent <AnimationSwitcher>(); _audioController = GetComponent <AudioController>(); _playerOverlay = this.GetComponent <GameOverlay>(); }
public void PickupResource(ResourceType resourceType) { if (resourceType == ResourceType.Seed) { holdingState = PlayerHoldingState.Seed; } else if (resourceType == ResourceType.Water) { holdingState = PlayerHoldingState.Water; WaterCharges = maxWaterCharges; } }
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; } }
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; }
protected override void Start() { base.Start(); _holdingState = GetComponent <PlayerHoldingState>(); }
protected override void Awake() { base.Awake(); _holdingState = this.GetComponent <PlayerHoldingState>(); }
public void PickupBaby(BabyMovement babyMovement) { babyMovement.WasPickedUp(); heldBaby = babyMovement; holdingState = PlayerHoldingState.Baby; }