예제 #1
0
    void Start()
    {
        // foreach (KnifeIron iron in GameObject.FindObjectsOfType<KnifeIron>()) {
        //  iron.Set_Magnet(this);
        // }

        UI_text = Instantiate(UI_prefab, HushPuppy.safeFind("Canvas").transform, false).
                  GetComponentInChildren <TextMeshProUGUI>();
        UI_text.transform.position = Camera.main.WorldToScreenPoint(this.transform.position);
    }
예제 #2
0
    public void Initialize()
    {
        worldCanvas = HushPuppy.safeFind("WorldCanvas");
        player      = HushPuppy.safeFindComponent("Player", "Player") as Player;

        GameObject aux = Instantiate(spearCapture_prefab, worldCanvas.transform, false);

        aux.transform.position = this.transform.position;
        spearCapture           = aux.GetComponentInChildren <Image>();
    }