Exemplo n.º 1
0
    public static void createFloatingText(Transform location)
    {
        DiamondText instance       = Instantiate(DiamondText);
        Vector2     screenPosition = Camera.main.WorldToScreenPoint(location.position);

        instance.transform.SetParent(Canvas.transform, false);
        instance.transform.position = screenPosition;
    }
Exemplo n.º 2
0
 public static void Initialize()
 {
     Canvas      = GameObject.Find("Canvas");
     DiamondText = Resources.Load <DiamondText>("Prefabs/DiamondTextParent");
 }