Exemplo n.º 1
0
 private void FixedUpdate()
 {
     if (!isCatching)
     {
         float step = 0.15f * Time.deltaTime;
         transform.position = Vector3.MoveTowards(transform.position, PointerRaycast.GetInstance().CurrentTarget.Value, step);
     }
 }
Exemplo n.º 2
0
    public float runThreshold;  //min target distance to animate run

    // Update is called once per frame
    void Update()
    {
        if (GameManager.instance.anchor != null)
        {
            transform.parent = GameManager.instance.anchor.transform;
        }

        if (!PointerRaycast.GetInstance().CurrentTarget.Equals(null))
        {
            this._WalkTo(PointerRaycast.GetInstance().CurrentTarget.Value);
        }
    }
Exemplo n.º 3
0
    void FixedUpdate()
    {
        var target = PointerRaycast.GetInstance().CurrentTarget;

        if (target == null)
        {
            return;
        }

        if (!m_pointer)
        {
            m_pointer = Instantiate(movePointerPrefab, target.Value, Quaternion.identity);
        }
        m_pointer.transform.position = target.Value;
    }
Exemplo n.º 4
0
    // Update is called once per frame
    void FixedUpdate()
    {
        if (m_isAnchored)
        {
            return;
        }

        var center = PointerRaycast.GetInstance().CurrentTarget;

        if (center != null)
        {
            if (m_Arena != null)
            {
                m_Arena.transform.position = center.Value;
            }
            else
            {
                m_Arena = Instantiate(arenaPrefab, center.Value, Quaternion.identity);
            }
        }
    }
Exemplo n.º 5
0
 public PointerRaycast()
 {
     PointerRaycast.m_instance = this;
 }