작업 조건 분석 기능 개발
This commit is contained in:
36
Assets/Chart And Graph/Tutorials/Pie/pieLengthModifier.cs
Normal file
36
Assets/Chart And Graph/Tutorials/Pie/pieLengthModifier.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
using ChartAndGraph;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class pieLengthModifier : MonoBehaviour
|
||||
{
|
||||
static Dictionary<string, float> LengthDictionary = new Dictionary<string, float>();
|
||||
static pieLengthModifier()
|
||||
{
|
||||
LengthDictionary["Category 1"] = 50f;
|
||||
LengthDictionary["Category 2"] = 100f;
|
||||
LengthDictionary["Category 3"] = 150f;
|
||||
}
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
var pie = GetComponent<PieInfo>();
|
||||
try
|
||||
{
|
||||
pie.pieObject.ItemLabel.Direction.Length = LengthDictionary[pie.Category];
|
||||
}
|
||||
catch(Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user