﻿using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using VRC.SDK3.Avatars.Components;
using VRC.SDK3.Avatars.ScriptableObjects;

namespace CRPen2
{
    public class CRPen2Setting : MonoBehaviour
    {
        public enum Gesture { F2_FIST=1, F3_HANDOPEN=2, F4_FINGERPOINT=3, F5_VICTORY=4, F6_ROCKNROLL=5, F7_HANDGUN=6, F8_THUMBSUP=7 }
        public enum Hand { Right, Left }

        public Object root;
        public GameObject penPrefab;
        public RuntimeAnimatorController gestureAnimator;
        public RuntimeAnimatorController fxAnimator;

        public VRCAvatarDescriptor avatar = null;

        public Transform inkPosition;
        public Transform canvasPosition;

        public float lifetime = 120;
        public float size = 0.01f;        
        public Gesture drawGesture = Gesture.F2_FIST;

        public Hand useHand = Hand.Right;
        public AnimationClip penGestureClip;

        public bool useGrip = true;
        public bool useSize = true;
        public bool useColor = true;
        public bool useEmission = true;

        public bool applyDirectly = false;

        [SerializeField] public int colorCount = 8;
        [SerializeField] public Color[] colorList = Enumerable.Repeat<Color>(new Color(1, 1, 1, 1), 8).ToArray();
    }
}