コード例 #1
0
        public override void Initialize()
        {
            var model = GetModelFromOwner();
            var size  = MeasureMesh(model);

            Entity = new Cone(
                MathConverter.Convert(Manager.Owner.Location),
                size.Y,
                size.X / 2,
                Mass);

            if (Mass <= 0)
            {
                Entity.BecomeKinematic();
            }
            else
            {
                Entity.BecomeDynamic(Mass);
            }

            base.Initialize();
        }