示例#1
0
    public void AddWord(SpritesAndText info)
    {
        spritesAndText = info;
        GameObject a = Instantiate(newWord);
        ActualObjectiveProperties actualObjectiveProperties = a.GetComponent <ActualObjectiveProperties>();

        actualObjectiveProperties.SetPropieties(spritesAndText.GetClueSprite(), spritesAndText.GetPlaceSprite(), spritesAndText.GetStatusSprite(), spritesAndText.GetClueText(), spritesAndText.GetObjectiveText());
        actualObjectiveProperties.UpdateProperties();
        actualObjectiveProperties.HidePanel();

        a.transform.SetParent(wordsPanel.transform, false);
    }
    void AddObjective(int i)
    {
        //Debug.Log("adding objetive " + i);
        spritesAndText = collectablesList[i].GetComponent <SpritesAndText>();
        GameObject a = Instantiate(objective);
        ActualObjectiveProperties actualObjectiveProperties = a.GetComponent <ActualObjectiveProperties>();

        actualObjectiveProperties.SetPropieties(spritesAndText.GetClueSprite(), spritesAndText.GetPlaceSprite(), spritesAndText.GetStatusSprite(), spritesAndText.GetClueText(), spritesAndText.GetObjectiveText());
        actualClueController.SetPropieties(spritesAndText.GetClueSprite(), spritesAndText.GetPlaceSprite(), spritesAndText.GetClueText());

        actualObjectiveProperties.UpdateProperties();
        actualClueController.UpdateProperties();
        actualObjectiveProperties.HidePanel();

        a.transform.SetParent(objectivesNewPanel.transform, false);
    }