public RadiusCloneControl(ISceneObject cloned)
        {
            if (!(cloned is ISpheric))
            {
                throw new ArgumentException("RadiusCloneControl must clone an ISpheric object");
            }

            this.cloned = cloned as ISpheric;
        }
        protected override void InitControl(ISceneObject obj)
        {
            if (!(obj is ISpheric))
            {
                Logger.Error("ShrinkingControl can be attached only to object with Radius property!");
                return;
            }

            sphere         = obj as ISpheric;
            startingRadius = sphere.Radius;
        }
示例#3
0
        protected override void InitControl(Entities.ISceneObject me)
        {
            base.InitControl(me);

            if (!(me is ISpheric))
            {
                Logger.Error("ShrinkingControl can be attached only to object with Radius property!");
                return;
            }

            sphere = me as ISpheric;
        }