Aimbot-PPO/Aimbot-PPO-MultiScene/Assets/XCharts/Examples/Example50_Scatter.cs
Koha9 2d404cfdf2 Aimbot Enviroment very first
Basic environment include Multi scene, Reward Change, Visible chart, etc....
2022-09-05 20:46:08 +09:00

35 lines
869 B
C#

using System;
using System.Collections.Generic;
using UnityEngine;
using XCharts.Runtime;
namespace XCharts.Example
{
[DisallowMultipleComponent]
[ExecuteInEditMode]
public class Example50_Scatter : MonoBehaviour
{
private ScatterChart chart;
void Awake()
{
chart = gameObject.GetComponent<ScatterChart>();
if (chart == null) return;
foreach (var serie in chart.series)
{
serie.symbol.sizeFunction = SymbolSize;
serie.symbol.selectedSizeFunction = SymbolSelectedSize;
}
}
float SymbolSize(List<double> data)
{
return (float) (Math.Sqrt(data[2]) / 6e2);
}
float SymbolSelectedSize(List<double> data)
{
return (float) (Math.Sqrt(data[2]) / 5e2);
}
}
}