public void AddCombo() { if (comboActive) { currentCombo += 1; comboDisplay.gameObject.SetActive(true); comboDisplay.text = ("HIT : " + currentCombo); StartCoroutine(PlayerResourcesManager.ChargeUpDash(0)); bowChargeSpeedReduction = currentCombo * 0.5f; playerBlinkersManager.blinkerCooldownReduction = bowChargeSpeedReduction; } }
private void CreatePlatform() { if (PlayerResourcesManager.IsThereEnoughResource(2, 0) && isTimeStopped) { Vector3 spawnPosition = gameObject.transform.position - new Vector3(0, 1.4f, 0) + transform.forward * playerPhysicsModule.speedLimit / 4f; if (!IsMoving()) { spawnPosition = gameObject.transform.position - new Vector3(0, 1f, 0); } PlayerResourcesManager.JumpsLeft -= 1; Instantiate(Resources.Load("Prefabs/SourcePlatform") as GameObject, spawnPosition, Quaternion.identity); } }
public override void ModuleUpdate() { GatherSource(); if (Input.GetKeyDown(KeyCode.F) && PlayerResourcesManager.IsThereEnoughResource(3, 0) && IsMoving()) { StartCoroutine(Dash()); } if (Input.GetKeyDown(KeyCode.Space) && !playerPhysicsModule.onGround) { CreatePlatform(); } if (Input.GetKeyDown(KeyCode.R)) { SwitchArrowHead(); } }
public bool CheckIfCurrentArrowIsAvailable(string currentArrowheadName) { bool arrowAvailable = false; switch (currentArrowheadName) { case "DefaultArrow": arrowAvailable = PlayerResourcesManager.IsThereEnoughResource(4, 0); break; case "TimeZoneArrow": arrowAvailable = PlayerResourcesManager.IsThereEnoughResource(1, 0); break; case "CloudArrow": arrowAvailable = PlayerResourcesManager.IsThereEnoughResource(5, 0); break; } return(arrowAvailable); }
public Card(PlayerResourcesManager playerResources) { _playerResources = playerResources; }
private void Start() { _playerResources = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerResourcesManager>(); _playerCards = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerCardsManagement>(); }
public Coin(PlayerResourcesManager playerResources) : base(playerResources) { }