public void SetMode(int mode) { switch (mode) { case Solid3D.MODE.DEFAULT: ToggleMeshRenderers(defaultObject, true); ToggleMeshRenderers(previewObject, false); collisionHandler.GetComponent <Collider>().isTrigger = false; break; case Solid3D.MODE.PREVIEW: ToggleMeshRenderers(defaultObject, false); ToggleMeshRenderers(previewObject, true); collisionHandler.GetComponent <Collider>().isTrigger = true; break; } }
private void Start() { animator.StopPlayback(); _gameStarted = false; _tileSizeZ = Tile.tileZ; _tileSizeX = Tile.tileX; Health.dead = false; _playerCollider = collisionHandler.GetComponent <Collider>(); }
public void CancelPlacingGameObject() { if (electricCollisionHandler != null) { electricCollisionHandler.GetComponent <Collider>().isTrigger = true; PlayerManager.electricNetworkManager.ClearPreviewNetworkEdges(); } UnlinkFootprintColliderHandlerToModelDyerMaterialChanging(); PlayerManager.ResetInteractionState(); Destroy(gameObjectToBePlaced); modelDyer = null; }