예제 #1
0
    void OnInstantMove(InstantMoveCameraEvent e)
    {
        m_target = new Vector2(e.x, e.y);

        float z = transform.position.z;

        transform.position = new Vector3(m_target.x, m_target.y, z);

        Event <CameraMovedEvent> .Broadcast(new CameraMovedEvent(e.x, e.y));
    }
예제 #2
0
    void OnInstantMove(InstantMoveCameraEvent e)
    {
        UpdateTarget(e.pos, e.weight);

        int bestWeight = int.MinValue;

        foreach (var t in m_targets)
        {
            if (t.weight > bestWeight)
            {
                bestWeight = t.weight;
            }
        }

        if (bestWeight <= e.weight)
        {
            m_currentPosition = e.pos;
        }
    }
예제 #3
0
 void OnInstantMove(InstantMoveCameraEvent e)
 {
     InstantMove();
 }