mirror of
https://github.com/imperialsushi/gutterball-3.git
synced 2025-06-15 05:07:42 +00:00
New Version 1.6
New 125 balls & powerups. Improved graphics.
This commit is contained in:
parent
b35433ae45
commit
71779ef7ac
9413 changed files with 193360 additions and 264803 deletions
|
@ -0,0 +1,72 @@
|
|||
|
||||
#pragma strict
|
||||
|
||||
@CustomEditor (TiltShift)
|
||||
class TiltShiftEditor extends Editor
|
||||
{
|
||||
var serObj : SerializedObject;
|
||||
|
||||
var focalPoint : SerializedProperty;
|
||||
var smoothness : SerializedProperty;
|
||||
var visualizeCoc : SerializedProperty;
|
||||
|
||||
var renderTextureDivider : SerializedProperty;
|
||||
var blurIterations : SerializedProperty;
|
||||
var foregroundBlurIterations : SerializedProperty;
|
||||
var maxBlurSpread : SerializedProperty;
|
||||
var enableForegroundBlur : SerializedProperty;
|
||||
|
||||
function OnEnable () {
|
||||
serObj = new SerializedObject (target);
|
||||
|
||||
focalPoint = serObj.FindProperty ("focalPoint");
|
||||
smoothness = serObj.FindProperty ("smoothness");
|
||||
visualizeCoc = serObj.FindProperty ("visualizeCoc");
|
||||
|
||||
renderTextureDivider = serObj.FindProperty ("renderTextureDivider");
|
||||
blurIterations = serObj.FindProperty ("blurIterations");
|
||||
foregroundBlurIterations = serObj.FindProperty ("foregroundBlurIterations");
|
||||
maxBlurSpread = serObj.FindProperty ("maxBlurSpread");
|
||||
enableForegroundBlur = serObj.FindProperty ("enableForegroundBlur");
|
||||
}
|
||||
|
||||
function OnInspectorGUI () {
|
||||
serObj.Update ();
|
||||
|
||||
var go : GameObject = (target as TiltShift).gameObject;
|
||||
|
||||
if (!go)
|
||||
return;
|
||||
|
||||
if (!go.camera)
|
||||
return;
|
||||
|
||||
GUILayout.Label ("Current: "+go.camera.name+", near "+go.camera.nearClipPlane+", far: "+go.camera.farClipPlane+", focal: "+focalPoint.floatValue, EditorStyles.miniBoldLabel);
|
||||
|
||||
GUILayout.Label ("Focal Settings", EditorStyles.boldLabel);
|
||||
EditorGUILayout.PropertyField (visualizeCoc, new GUIContent("Visualize"));
|
||||
focalPoint.floatValue = EditorGUILayout.Slider ("Distance", focalPoint.floatValue, go.camera.nearClipPlane, go.camera.farClipPlane);
|
||||
EditorGUILayout.PropertyField (smoothness, new GUIContent("Smoothness"));
|
||||
|
||||
EditorGUILayout.Separator ();
|
||||
|
||||
GUILayout.Label ("Background Blur", EditorStyles.boldLabel);
|
||||
renderTextureDivider.intValue = EditorGUILayout.Slider ("Downsample", renderTextureDivider.intValue, 1, 3);
|
||||
blurIterations.intValue = EditorGUILayout.Slider ("Iterations", blurIterations.intValue, 1, 4);
|
||||
EditorGUILayout.PropertyField (maxBlurSpread, new GUIContent("Max blur spread"));
|
||||
|
||||
EditorGUILayout.Separator ();
|
||||
|
||||
GUILayout.Label ("Foreground Blur", EditorStyles.boldLabel);
|
||||
EditorGUILayout.PropertyField (enableForegroundBlur, new GUIContent("Enable"));
|
||||
|
||||
if (enableForegroundBlur.boolValue)
|
||||
foregroundBlurIterations.intValue = EditorGUILayout.Slider ("Iterations", foregroundBlurIterations.intValue, 1, 4);
|
||||
|
||||
//GUILayout.Label ("Background options");
|
||||
//edgesOnly.floatValue = EditorGUILayout.Slider ("Edges only", edgesOnly.floatValue, 0.0, 1.0);
|
||||
//EditorGUILayout.PropertyField (edgesOnlyBgColor, new GUIContent ("Background"));
|
||||
|
||||
serObj.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue