Esempio n. 1
0
    public UnstCInfo(Color color, FontStyle fontStyle, Font font, UnstableObject unstableObject, int fontSize)
    {
        this.color     = color;
        this.fontStyle = fontStyle;
        this.font      = font;
        this.fontSize  = fontSize;

        rotation  = unstableObject.Rotation;
        vibration = unstableObject.Vibration;
        waitFrame = unstableObject.WaitFrame;

        unstableStyle = unstableObject.STYLE;
    }
Esempio n. 2
0
    private void OnGUI()
    {
        GUILayout.Label("Object Name", EditorStyles.label);
        mName = GUILayout.TextField(mName);

        GUILayout.Label("Message", EditorStyles.label);
        mMessage = EditorGUI.TextField(new Rect(2.5f, 55f, EditorGUIUtility.currentViewWidth - 7f, 18f), mMessage);

        GUILayout.Space(21f);

        GUILayout.Label("Font", EditorStyles.label);
        mFont = (Font)EditorGUILayout.ObjectField(mFont, typeof(Font), true);

        GUILayout.Label("Parent Canvas", EditorStyles.label);
        mCanvas = (Canvas)EditorGUILayout.ObjectField(mCanvas, typeof(Canvas), true);

        GUILayout.Space(16f);

        GUILayout.Label("Letter Spacing", EditorStyles.label);
        mLetterSpacing = EditorGUILayout.FloatField(mLetterSpacing);

        GUILayout.Label("Font Size", EditorStyles.label);
        mFontSize = EditorGUILayout.IntField(mFontSize);

        mFontStyle = (FontStyle)EditorGUILayout.EnumPopup("Font Style", mFontStyle);
        mUnstable  = (UnstableStyle)EditorGUILayout.EnumPopup("Unstable Style", mUnstable);

        GUILayout.Label("Vibration", EditorStyles.label);
        mVibration = EditorGUILayout.Slider(mVibration, 0.01f, 3f);

        GUILayout.Label("Rotation", EditorStyles.label);
        mRotation = EditorGUILayout.Slider(mRotation, 0f, 180f);

        GUILayout.Label("Wait Frame", EditorStyles.label);
        mWaitFrame = (uint)EditorGUILayout.IntSlider((int)mWaitFrame, 0, 60);

        mPosition = EditorGUILayout.Vector3Field("Position", mPosition);

        GUILayout.Label("Color", EditorStyles.label);
        mColor = EditorGUILayout.ColorField(mColor);

        if (GUILayout.Button("Create!") && !EditorApplication.isPlaying)
        {
            Create();
        }
    }
Esempio n. 3
0
 public void Setting(uint waitFrame, float vibration, float rotation, UnstableStyle style)
 {
     mWaitFrame = waitFrame; mVibration = vibration; mRotation = rotation; mSTYLE = style;
 }
Esempio n. 4
0
 public UnstableObject(uint waitFrame, float rotation, float vibration, UnstableStyle style)
 {
     mWaitFrame = waitFrame; mVibration = vibration; mRotation = rotation; mSTYLE = style;
 }