예제 #1
0
    // 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);
                }
            }
        }
    }
예제 #2
0
    // 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);
        }
    }
예제 #3
0
    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);
    }