Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created June 24, 2018 05:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todorok1/d31d4681cda91b56de9276f2143ee18d to your computer and use it in GitHub Desktop.
Save todorok1/d31d4681cda91b56de9276f2143ee18d to your computer and use it in GitHub Desktop.
連続確率変数を乱数とカーブで
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