Пример #1
0
        public double ComputeDistance(Point location1, Point location2)
        {
            double dResult = 0;

            Line oLine = new LineClass();
            Points oPointsCol = new PointsClass();
            oPointsCol.Add(location1);
            oPointsCol.Add(location2);
            oLine.Parts.Add(oPointsCol);

            dResult = this.ComputeDistance(oLine);

            return dResult;
        }
Пример #2
0
        public double ComputeDistance(Point location1, Point location2)
        {
            double dResult = 0;

            Line   oLine      = new LineClass();
            Points oPointsCol = new PointsClass();

            oPointsCol.Add(location1);
            oPointsCol.Add(location2);
            oLine.Parts.Add(oPointsCol);

            dResult = this.ComputeDistance(oLine);

            return(dResult);
        }
Пример #3
0
    private void Start()
    {
        SaveSystem  ss    = SaveSystem.GetInstance();
        PointsClass level = ss.pointSystem.GetLevelInfo(levelPage - 1, levelNumber - 1); //indexado em 1!

        Debug.Assert(level != null);

        //pega num de estrelas do save persistente
        CountStars = level.LevelPoints;
        Completed  = level.cleared;

        //pega infos de quem passou vivo no save system
        ZeStar   = level.charSaved[0];
        DedeStar = level.charSaved[1];
        ManeStar = level.charSaved[2];

        Star1.SetActive(false);
        Star2.SetActive(false);
        Star3.SetActive(false);

        if (ZeStar)
        {
            Star1.SetActive(true);
        }
        if (DedeStar)
        {
            Star2.SetActive(true);
        }
        if (ManeStar)
        {
            Star3.SetActive(true);
        }

        myButton = GetComponent <Button>();
        myButton.onClick.AddListener(() => SoundSystem.PlaySound("click"));
        //geralmente não gosto de trabalhar dessa maneira, e sim adicionando os eventos pelo inspector, o que considero mais legível e organizado.
        //mas dessa vez esse atalho me salvou uns 20 minutos de clicar idiotamente. Ass: Krauss
    }