Ejemplo n.º 1
0
        private void btnAddEntity_Click(object sender, EventArgs e)
        {
            SimsState newState = new SimsState("新狀態", 120, 100, 50);

            m_states.Add(newState);

            SetSelectedObject(newState);
            this.Invalidate();
        }
Ejemplo n.º 2
0
        public SimsAffect(SimsState _A, SimsState _B, float _volum)
        {
            A            = _A;
            B            = _B;
            affectVolumn = _volum;

            // contact connectionship
            A.Contact(this);
            B.Contact(this);

            // visual - init.
            PointF amidPt = new PointF((float)(A.Location.X + B.Location.X) / 2.0f, (float)(A.Location.Y + B.Location.Y) / 2.0f);
            PointF Ap     = CalcHelper.CalcCircleBoundPos(A.Location.X, A.Location.Y, A.Radius, amidPt.X, amidPt.Y);
            PointF Bp     = CalcHelper.CalcCircleBoundPos(B.Location.X, B.Location.Y, B.Radius, amidPt.X, amidPt.Y);

            _preAp = Ap;
            _preBp = Bp;

            m_ArrowLine = new SimsArrowLine(Ap.X, Ap.Y, amidPt.X, amidPt.Y, Bp.X, Bp.Y);
        }
Ejemplo n.º 3
0
 public void AddSims(SimsState state)
 {
     m_states.Add(state);
 }