예제 #1
0
 public void GenerateNewCube()
 {
     if (cubeSize[0] == 0 || cubeSize[1] == 0 || cubeSize[2] == 0)
     {
         return;
     }
     CreateCube.NewCube(new Vector3(cubeSize[0], cubeSize[1], cubeSize[2]));
 }
예제 #2
0
 void OnGUI()
 {
     cubeSize = EditorGUILayout.Vector3Field("Cube Dimensions", cubeSize, GUILayout.ExpandWidth(false));
     if (GUILayout.Button("Generate", GUILayout.ExpandWidth(false)))
     {
         if (cubeSize.x == 0 || cubeSize.y == 0 || cubeSize.z == 0)
         {
             ShowNotification(new GUIContent("Values must be all nonzero"));
             return;
         }
         CreateCube.NewCube(cubeSize);
     }
 }
예제 #3
0
    // private bool isActiveOnHit = true;
    // public GameObject cube_2;

    void Awake()
    {
        _rigidbody  = GetComponent <Rigidbody>();
        _createCube = spawn.GetComponent <CreateCube>();
        // _moveAndShot = GetComponent<MoveAndShot>();
    }