コード例 #1
0
        public override void SetToStart()
        {
            TweenColorRotation tween = ((TweenColorRotation)target);

            if (!tween.useMaterial)
            {
                Color initial;
                if (initialSet)
                {
                    initial = tween.initialColor;
                    tween.Awake();
                    tween.initialColor = initial;
                }
                else
                {
                    tween.Awake();
                    initialSet = true;
                }
                tween.SetToLerpPoint(0f);
            }
            else
            {
                //if ( tween.material != null ) {
                //    tween.material.SetMatrix(tween.materialProperty,);
                //}
            }
        }
コード例 #2
0
        public override void SetToEnd()
        {
            TweenColorRotation tween = ((TweenColorRotation)target);

            if (!tween.useMaterial)
            {
                tween.Awake();
                tween.SetToLerpPoint(1f);
            }
        }
コード例 #3
0
        public void SetColor()
        {
            if (!initialSet)
            {
                return;
            }
            TweenColorRotation tween = ((TweenColorRotation)target);

            tween.Awake();
        }
コード例 #4
0
        public override void OnInspectorGUI()
        {
            // base.OnInspectorGUI();
            TweenColorRotation item = (TweenColorRotation)target;

            base.OnInspectorGUI();
            if (item.setMatrix)
            {
                EditorGUILayout.HelpBox("use _MatrixYIQ property for supplied shaders or equivalent.", MessageType.Info);
            }
            if (GUILayout.Button("SetColor"))
            {
                SetColor();
            }
        }