コード例 #1
0
ファイル: turnscript.cs プロジェクト: llama-llove/Code-week
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     // gives cameracontroller script the current rotation's movement direction and axis to become flat on
     camera      = animator.gameObject.GetComponent <cameracontroller>();
     camera.move = Vect;
     camera.Vect = flatter;
 }
コード例 #2
0
 // Start is called before the first frame update
 void Start()
 {
     // sets the true position of the object and finds the main camera
     position = transform.position;
     camera   = GameObject.Find("camera").GetComponent <cameracontroller>();
 }