// Update is called once per frame void Update() { grounded = Physics2D.Linecast(transform.position, groundCheckTransform.position, 1 << LayerMask.NameToLayer("Ground")); if (Input.GetButtonDown("Jump")) { if (grounded) { airChargeReady = true; } var target = Camera.main.ScreenToWorldPoint(Input.mousePosition); KHeatmap.Log("TouchPoint", target); if (airChargeReady) { bool inRect = rectTransform.rect.Contains(rectTransform.worldToLocalMatrix.MultiplyPoint(target)); if (inRect) { airChargeReady = grounded; playerSkills.initCharge(transform.position, target, grounded); } } } }
// Update is called once per frame void Update() { m_timer += Time.deltaTime; if (m_timer >= m_logTime) { m_timer = 0.0f; KHeatmap.Log(name + "Pos", transform.position); } }
public void OnTriggerEnter2D(Collider2D other) { Burnable burnable = other.GetComponent <Burnable>(); if (GetComponent <SelfDestruction>() == null && burnable && !burnable.IsBurning()) { HeatmapEvent.Send("BurnedVegetation2", transform.position, Time.timeSinceLevelLoad); KHeatmap.Log("BurnedVegetation2", transform.position); burnable.Burn(); } //if (other.GetComponent<ChargeRecharge>()) //boostEffect(true); }