void Start()
    {
        pointToMoveParticle = movePointParticle.GetComponent <ParticleSystem>();;
        selected            = Units_Selection.selectionInstance;

        Cursor.SetCursor(mainCursor, Vector2.zero, CursorMode.Auto);
    }
示例#2
0
    void Awake()
    {
        selectionInstance = this; //Singletone - Can access the script without getting a component value

        if (canvas == null)
        {
            canvas = FindObjectOfType <Canvas>();
        }

        if (selectionBox != null)
        {
            //We need to reset anchors and pivot to ensure proper positioning
            rt           = selectionBox.GetComponent <RectTransform>();
            rt.pivot     = Vector2.one * .5f;
            rt.anchorMin = Vector2.one * .5f;
            rt.anchorMax = Vector2.one * .5f;
            selectionBox.gameObject.SetActive(false);
        }
    }
 private void Awake()
 {
     selected = Units_Selection.selectionInstance;
 }