private void OnTriggerEnter2D(Collider2D other) { ProjectileBehaviour otherProjectileObject = other.GetComponent <ProjectileBehaviour>(); if (otherProjectileObject != null && otherProjectileObject.health > 0) { if (otherProjectileObject.GetDamage(1)) { GameController.instance.lineRenderer.gameObject.GetComponent <MouseMovement>().oneSwipeKillsCounter += 1; GameController.instance.IncreaseKills(1); if (GameController.instance.lineRenderer.gameObject.GetComponent <MouseMovement>().oneSwipeKillsCounter > 2) { streakController.ShowStreak(GameController.instance.lineRenderer.gameObject.GetComponent <MouseMovement>().oneSwipeKillsCounter); } } } }
private void OnTriggerEnter2D(Collider2D other) { ProjectileBehaviour otherProjectileObject = other.GetComponent <ProjectileBehaviour>(); if (otherProjectileObject != null && otherProjectileObject.health > 0) { killedProj = otherProjectileObject.GetDamage(lineDamage); if (killedProj) { oneSwipeKillsCounter += 1; GameController.instance.IncreaseKills(oneSwipeKillsCounter); linerend.widthMultiplier *= oneSwipeKillsCounter; linerend.widthMultiplier = Mathf.Clamp(linerend.widthMultiplier, curveWidthMultiplayer, curveWidthMultiplayer * 3); if (oneSwipeKillsCounter > 2) { StreakUIController.ShowStreak(oneSwipeKillsCounter); if (vampirismBonusActive) { GameController.instance.player.Heal(vampirismHealAmount); } } } } }