protected void OnConfigLoaded(string error, string content) { // logging error if (!string.IsNullOrEmpty(error)) { Log.Error(string.Format("Error! {0}", error)); return; } // signing up for animation step completion events FtueAnimationSequence.OnFtueAnimationSequenceComplete += OnFtueAnimationSequenceCompleteHandler; FtueAnimationSequence.OnFtueAnimationWaiting += OnFtueAnimationWaiting; FtueAnimationSequence.OnFtueAnimationClipComplete += OnFtueAnimationClipComplete; // parsing the config sequence = JsonUtility.FromJson <FtueAnimationSequence>(content); // initializing sequence sequence.Init(agents, gameObject); // setting the holocron position for initial entry Vector3 newPos = new Vector3(HolocronContainer.transform.position.x, Sdk.StereoCamera.transform.position.y, HolocronContainer.transform.position.z); HolocronContainer.transform.position = newPos; // playing holocron enter animation HolocronContainer.GetComponent <Animator>().Play("Enter"); }
protected void OnConfigLoaded(string error, string content) { // logging error if (!string.IsNullOrEmpty(error)) { Log.Error(string.Format("Error! {0}", error)); return; } // signing up for animation step completion events FtueAnimationSequence.OnFtueAnimationSequenceComplete += OnFtueAnimationSequenceCompleteHandler; FtueAnimationSequence.OnFtueAnimationWaiting += OnFtueAnimationWaiting; FtueAnimationSequence.OnFtueAnimationClipComplete += OnFtueAnimationClipComplete; // parsing the config sequence = JsonUtility.FromJson <FtueAnimationSequence>(content); // creating array of FtueAgent instances FtueAgent[] agents = new FtueAgent[5] { null, null, null, null, AgentForDarkSide.GetComponent <DarkSideAgent>() }; // initializing sequence sequence.Init(agents, gameObject, FtueType.DarkSide); }