Beispiel #1
0
    // Update is called once per frame
    void LateUpdate()
    {
        Vector3 newPosition = miniMap.TransformPosition(transform.position);

        myRectTransform.localPosition = newPosition;
        if (gameObject.name.Contains("Character"))
        {
            if (partySystem.getGroupID(gameObject) == -1 && !image.color.Equals(Color.gray))
            {
                myRectTransform.localScale = new Vector3(0.5f, 0.5f, 0.5f);
                image.color = Color.gray;
            }
            else if (partySystem.getGroupID(gameObject) != -1 && !image.color.Equals(Color.green))
            {
                myRectTransform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
                image.color = Color.green;
            }
        }
    }