Exemplo n.º 1
0
 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;
     }
 }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
    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();
        }
    }
Exemplo n.º 4
0
    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);
    }
Exemplo n.º 5
0
 public Card(PlayerResourcesManager playerResources)
 {
     _playerResources = playerResources;
 }
Exemplo n.º 6
0
 private void Start()
 {
     _playerResources = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerResourcesManager>();
     _playerCards     = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerCardsManagement>();
 }
Exemplo n.º 7
0
 public Coin(PlayerResourcesManager playerResources) : base(playerResources)
 {
 }