// Start is called before the first frame update
 void Start()
 {
     forgeInfo     = "Pick a part and a material";
     defaultColour = infoText.color;
     resultFunc    = Result.GetComponent <ItemFunction>();
     WorldCanvas   = GameObject.Find("Canvas");
     mainCurrency  = WorldCanvas.GetComponent <Currency>();
 }
Esempio n. 2
0
    public static void Position(RectTransform item, Vector3 worldPos)
    {
        item.anchorMin = item.anchorMax = Vector2.zero;
        Canvas canvas = _instance.GetComponent <Canvas>();

        item.transform.SetParent(canvas.transform, false);
        item.anchoredPosition = canvas.worldCamera.WorldToScreenPoint(worldPos);
    }
Esempio n. 3
0
    public void InitalizeStage()
    {
        DisplayMap.CompressBounds();
        Bounds bounds = Instance.DisplayMap.localBounds;

        stageBounds = bounds;
        InputManager.Instance.SetCameraBounds();
        WorldCanvas.GetComponent <Canvas>().worldCamera = Camera.main;
        HighlightMap.gameObject.SetActive(false);
        BattleManager.Initialize();
    }