Created
June 24, 2018 05:50
-
-
Save todorok1/d31d4681cda91b56de9276f2143ee18d to your computer and use it in GitHub Desktop.
連続確率変数を乱数とカーブで
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class RandomWithCurve : MonoBehaviour { | |
[SerializeField] | |
AnimationCurve curve; | |
void Start(){ | |
Debug.Log("0.25を与えると : " + curve.Evaluate(0.25f)); | |
Debug.Log("0.5を与えると : " + curve.Evaluate(0.5f)); | |
Debug.Log("0.75を与えると : " + curve.Evaluate(0.75f)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment