Beispiel #1
0
    Landmark CreateLandmark(int level)
    {
        if (level > highest_level_)
        {
            highest_level_ = level;
        }

        Landmark landmark = Instantiate(landmark_prefab_).GetComponent <Landmark>();

        landmark.level_ = level;
        landmark.SetModel(Instantiate(model_prefab_[landmark.level_ - 1]));
        landmark.model_.transform.SetParent(landmark.transform);
        landmark.model_.transform.localPosition = Vector3.zero;

        landmark.SetNumber(Instantiate(number_prefab_[landmark.level_ - 1]));
        landmark.number_.transform.SetParent(landmark.transform);
        landmark.number_.transform.localPosition = Vector3.zero;

        return(landmark);
    }