Esempio n. 1
0
 public MainWindow()
 {
     InitializeComponent();
     UpdateCore.version(ver);
     if (!UpdateCore.verchk)
     {
         UpdateForm frm = new UpdateForm();
         Hide();
         frm.Show();
     }
     else
     {
         changefilename();
         CuttingEdge.Osuroot();
         FormCuttingEdge frm2 = new FormCuttingEdge();
         Hide();
         frm2.Show();
     }
 }
Esempio n. 2
0
        protected override bool Initialize()
        {
            var rb = RigidBody?.GetInitialized <RigidBody>()?.Native;

            if (rb == null)
            {
                Debug.LogWarning("Unable to find RigidBody component for DeformableTerrainShovel - shovel instance ignored.", this);
                return(false);
            }

            if (!TopEdge.Valid)
            {
                Debug.LogWarning("Unable to create shovel - invalid Top Edge.", this);
            }
            if (!CuttingEdge.Valid)
            {
                Debug.LogWarning("Unable to create shovel - invalid Cutting Edge.", this);
            }
            if (!CuttingDirection.Valid)
            {
                Debug.LogWarning("Unable to create shovel - invalid Cutting Direction.", this);
            }

            if (!HasValidateEdges())
            {
                return(false);
            }

            Native = new agxTerrain.Shovel(rb,
                                           TopEdge.ToNativeEdge(gameObject),
                                           CuttingEdge.ToNativeEdge(gameObject),
                                           CuttingDirection.CalculateLocalDirection(gameObject).ToHandedVec3());

            if (Settings == null)
            {
                Settings      = ScriptAsset.Create <DeformableTerrainShovelSettings>();
                Settings.name = "[Temporary]Shovel Settings";
            }

            return(true);
        }