public void SetNote(string TargetName,Vector3 TargetPosition){ newnote = new newNote(); //newnote.color = "black"; //newnote.radiusBefore = 1.0f; //newnote.angle = UnityEngine.Random.value * 2.0f * 10.0f;//値がマイナスだと0になるため10倍 -1~1をとるため2倍 //Debug.Log(newnote.angle); newnote.EmitTime = AudioManager.Instance.GetTimeBGM() - BPM ; // emit time is before 2.0s time on Input newnote.DecisionTime = 2.0f; newnote.RadiusIncrement = 0.025f; newnote.scale = 0.5f; newnote.TargetName = TargetName; this.CalcCordinate(TargetPosition,newnote); notes.Add(newnote); }
public void CalcCordinate(Vector3 tposition,newNote newnote){ radius = 1.5f; angle = UnityEngine.Random.Range (0, 360); float x = Mathf.Cos(angle * Mathf.Deg2Rad) * radius; float y = Mathf.Sin(angle * Mathf.Deg2Rad) * radius; newnote.posx = tposition.x + x; newnote.posy = -1.23f; newnote.posz = tposition.y + y; }