コード例 #1
0
ファイル: RepeatButton.cs プロジェクト: xclouder/godbattle
 public override void Reset () {
     base.Reset();
     texture = new ConcreteTextureVar();
     text = new ConcreteStringVar();
     tooltip = new ConcreteStringVar();
     guiStyle = new ConcreteStringVar();
 }
コード例 #2
0
ファイル: LayoutArea.cs プロジェクト: xclouder/godbattle
        public override void Reset () {
            rect = new ConcreteRectVar();
            x = new ConcreteFloatVar();
            y = new ConcreteFloatVar();
            width = new ConcreteFloatVar();
            height = new ConcreteFloatVar();

            texture = new ConcreteTextureVar();
            text = new ConcreteStringVar();
            tooltip = new ConcreteStringVar();
            guiStyle = new ConcreteStringVar();
        }
コード例 #3
0
ファイル: GetProperty.cs プロジェクト: xclouder/godbattle
 public override void Reset () {
     base.Reset();
     SingleValue = new ConcreteFloatVar();
     intValue = new ConcreteIntVar();
     BooleanValue = new ConcreteBoolVar();
     StringValue = new ConcreteStringVar();
     Vector3Value = new ConcreteVector3Var();
     RectValue = new ConcreteRectVar();
     ColorValue = new ConcreteColorVar();
     GameObjectValue = new ConcreteGameObjectVar(this.self);
     MaterialValue = new ConcreteMaterialVar();
     TextureValue = new ConcreteTextureVar();
     ObjectValue = new ConcreteObjectVar();
 }
コード例 #4
0
        /// <summary> 
        /// Draw a texture variable.
        /// <param name="rect">The position to draw the variable.</param>
        /// <param name="textureVar">The texture variable to be drawn.</param>
        /// </summary>
        static void DrawTextureVar (Rect rect, TextureVar textureVar) {
            rect.yMin += 3f;
            rect.yMax -= 2f;
            rect.xMin += 6f;
            rect.xMax -= 6f;
            DrawName(new Rect (rect.x, rect.y, c_SmallNameWidth, rect.height), textureVar);

            rect.xMin += c_SmallNameWidth + c_Space;
            rect.xMax -= c_MinusButtonWidth + c_RightPadding;
            EditorGUI.BeginChangeCheck();
            var newValue = EditorGUI.ObjectField (rect, GUIContent.none, textureVar.Value, typeof(Texture), true) as Texture;
            if (EditorGUI.EndChangeCheck() && newValue != textureVar.Value) {
                // Register undo
                if (textureVar.blackboard != null) { 
                    #if UNITY_4_0_0 || UNITY_4_1 || UNITY_4_2
                    Undo.RegisterUndo(textureVar.blackboard, "Variable Value");
                    #else
                    Undo.RecordObject(textureVar.blackboard, "Variable Value");
                    #endif
                }

                // Update variable value
                textureVar.Value = newValue;
                // Set blackboard dirty flag
                if (textureVar.blackboard != null) EditorUtility.SetDirty(textureVar.blackboard);
            }

            rect.x += rect.width + 2f;
            rect.width = c_MinusButtonWidth;
            rect.yMin -= 2f;
            rect.yMax += 2f;
            if (GUI.Button(rect, s_Styles.iconToolbarMinus, s_Styles.invisbleButton))
                s_VariableToRemove = textureVar;
        }
コード例 #5
0
 public override void Reset () {
     material = new ConcreteMaterialVar();
     newMainTexture = new ConcreteTextureVar();
 }
コード例 #6
0
ファイル: TextureRandom.cs プロジェクト: xclouder/godbattle
 public override void Reset () {
     textures = new TextureVar[] {new ConcreteTextureVar(null), new ConcreteTextureVar(null)};
     storeTexture = new ConcreteTextureVar();
 }
コード例 #7
0
ファイル: BoolToTexture.cs プロジェクト: xclouder/godbattle
 public override void Reset () {
     boolVariable = new ConcreteBoolVar();
     trueValue = (Texture)null;
     falseValue = (Texture)null;
     storeTexture = new ConcreteTextureVar();
 }
コード例 #8
0
ファイル: TextureSet.cs プロジェクト: xclouder/godbattle
 public override void Reset () {
     variable = new ConcreteTextureVar();
     newValue = new ConcreteTextureVar();
 }
コード例 #9
0
ファイル: SetGUITexture.cs プロジェクト: xclouder/godbattle
 public override void Reset () {
     newTexture = new ConcreteTextureVar();
     newColor = new ConcreteColorVar();
 }
コード例 #10
0
ファイル: SendMessage.cs プロジェクト: xclouder/godbattle
 public override void Reset () {
     gameObject = new ConcreteGameObjectVar(this.self);
     methodName = new ConcreteStringVar();
     options = SendMessageOptions.RequireReceiver;
     floatParameter = new ConcreteFloatVar();
     intParameter = new ConcreteIntVar();
     boolParameter = new ConcreteBoolVar();
     stringParameter = new ConcreteStringVar();
     vector3Parameter = new ConcreteVector3Var();
     rectParameter = new ConcreteRectVar();
     colorParameter = new ConcreteColorVar();
     quaternionParameter = new ConcreteQuaternionVar();
     gameObjectParameter = new ConcreteGameObjectVar(this.self);
     textureParameter = new ConcreteTextureVar();
     materialParameter = new ConcreteMaterialVar();
     fsmEventParameter = new ConcreteFsmEvent();
     objectParameter = new ConcreteObjectVar();
     messageType = MessageType.SendMessage;
 }
コード例 #11
0
 public override void Reset () {
     material = new ConcreteMaterialVar();
     propertyName = new ConcreteStringVar();
     newTexture = new ConcreteTextureVar();
 }