예제 #1
0
 public SimpleCamPath(string name)
 {
     this.name       = name;
     interpolator    = new TransformPointInterpolator();
     transformsCurve = new Interpolator4 <TransformPoint>(interpolator);
     runner          = PathRunner.Create(this);
 }
예제 #2
0
        internal static PathRunner Create(SimpleCamPath path)
        {
            GameObject ownerObject = new GameObject("KerbCam.PathRunner");

            UnityEngine.Object.DontDestroyOnLoad(ownerObject);
            PathRunner runner = ownerObject.AddComponent <PathRunner>();

            runner.path        = path;
            runner.ownerObject = ownerObject;
            // Don't use GUI layout, just input events and frame updates.
            runner.useGUILayout = false;
            runner.enabled      = false;
            return(runner);
        }