コード例 #1
0
ファイル: MonsterObject.cs プロジェクト: riyoyukai/Capstone
    void SwitchBehavior()
    {
        Array values = Behaviors.GetValues(typeof(Behaviors));

        state         = (Behaviors)Rand.ChooseOne(values);
        behaviorTimer = Rand.Range(behaviorTimerMin, behaviorTimerMax);
        print("My state is: " + state.ToString() + ", Next behavior in " + behaviorTimer + " seconds");
    }
コード例 #2
0
ファイル: GuiFacade.cs プロジェクト: worstward/rlviewer
        private void ShowSection(Behaviors.Sections.Abstract.Section section, Point p)
        {
            List<PointF> points = null;

            try
            {
                points = section.GetValues(_file, p).ToList();
            }
            catch
            {
                Forms.FormsHelper.ShowErrorMsg("Невозможно построить сечение");
                return;
            }

            var mark = section.InitialPointMark;
            var caption = GetSectionFormCaption(section);

            using (var sectionForm = new Forms.SectionGraphForm(points, mark, caption))
            {
                sectionForm.ShowDialog();
            }
            _section.ResetSection();
        }