private void FixedUpdate() { if (!LevelStartingPoint.GetInstance().IsFinished() || LevelEndingPoint.GetInstance().isFinishing()) { return; } Move(); }
public static LevelEndingPoint GetInstance() { if (instance == null) { instance = FindObjectOfType <LevelEndingPoint>(); } return(instance); }
void Update() { if (!LevelStartingPoint.GetInstance().IsFinished() || LevelEndingPoint.GetInstance().isFinishing()) { return; } CheckForEmpthyBags(); if (potsBag.Count > 0) { inputMannager(); } }
void FixedUpdate() { if (!LevelStartingPoint.GetInstance().IsFinished() || LevelEndingPoint.GetInstance().isFinishing()) { return; } if (m_FireTime < m_SecondsLimiter) { m_FireTime += Time.deltaTime * m_FirePerSecond; } if (Input.GetMouseButton(0) && !movement.GhostWalkActivated()) { anim.SetBool("Attacking", true); movement.IsAttacking(true); if (m_shootAnimTimer < m_shootAnimMaxTimer) { m_shootAnimTimer += Time.deltaTime; } else { anim.SetBool("Attacking", true); movement.IsAttacking(true); if (m_FireTime >= m_SecondsLimiter) { PoolObject bul = m_bulletPool.GetPooledObject(); Vector3 dir = m_MousePos.position - transform.position; dir.y = 0.0f; bul.gameObject.transform.rotation = Quaternion.LookRotation(dir); m_FireTime = 0.0f; audioManager.Play("Shoot"); } } } else { m_shootAnimTimer = 0; anim.SetBool("Attacking", false); movement.IsAttacking(false); } }
void Update() { if (!LevelStartingPoint.GetInstance().IsFinished() || LevelEndingPoint.GetInstance().isFinishing()) { return; } if (m_FireSpeedBuffTimer > 0) { m_FireSpeedBuffTimer -= Time.deltaTime; if (m_FireBuffTrigger) { m_FirePerSecond = m_InitialFirePerSecond * 2; m_FireBuffTrigger = false; } if (m_FireSpeedBuffTimer <= 0) //tiene que ir despues del -= Time.deltaTime { m_FirePerSecond = m_InitialFirePerSecond; m_FireSpeedBuffTimer = 0; } } }