public RenderTextureDemo(SFManager sfmgr, SFMovieCreationParams cp) : base(sfmgr, cp) { SFMgr = sfmgr; this.SetFocus(true); instance = this; }
public MainMenu(MenuCamera parent, SFManager sfmgr, SFMovieCreationParams cp) : base(sfmgr, cp) { this.parent = parent; SFMgr = sfmgr; this.SetFocus(false); }
public ScaleformMovie(ScaleformLayer layer, SFCamera cam, SFMovieCreationParams creationParams) : base(cam.GetSFManager(), creationParams) { Layer = layer; Camera = cam; SetFocus(true); }
public ScaleformMovie(ScaleformLayer layer, SFManager sfmgr, SFMovieCreationParams creationParams) : base(sfmgr, creationParams) { Layer = layer; SFManager = sfmgr; SetFocus(true); }
public ScaleformMovie(SFManager sfmgr, SFMovieCreationParams cp) : base(sfmgr, cp) { beginValues = new Value[3]; moveValues = new Value[3]; endValues = new Value[1]; cancelValues = new Value[1]; SetFocus(true); }
/* * public T CreateMovie <T> (SFMovieCreationParams params) where T : Movie * { * Activator.CreateInstance (typeof (T), argslist); * } */ public Movie CreateMovie(SFMovieCreationParams creationParams, Type MovieClassType) { Type[] argTypes = new Type[] { typeof(SFManager), typeof(SFMovieCreationParams) }; object[] argVals = new object[] { this, creationParams }; ConstructorInfo cInfo = MovieClassType.GetConstructor(argTypes); // Console.WriteLine(MovieClassType); // Console.WriteLine(cInfo); if (cInfo == null) { return(null); } Movie movie = (Movie)cInfo.Invoke(argVals); return(movie); }
/// <summary> /// The RenderTexture movie is created here. The movie is of movieClassType if one is specified, otherwise of type Movie. /// </summary> /// <param name="camera"></param> /// <param name="movieClassType"></param> /// <returns></returns> public bool CreateRenderMovie(SFCamera camera, Type movieClassType) { #if (UNITY_3_5) && UNITY_STANDALONE_WIN if (SystemInfo.graphicsDeviceVersion[0] == 'D') { return false; } #endif if (RenderTexture == null) { UnityEngine.Debug.Log("RenderTexture is null, failure to create RenderMovie. Check if you specified all the parameters properly."); return false; } if (RTTMovie == null || RTTMovie.MovieID == 0) { if (camera) { SFMovieCreationParams creationParams = SFCamera.CreateRTTMovieCreationParams(SwfName, 1, OriginX, OriginY, RenderTexture, ClearColor); creationParams.TheScaleModeType = ScaleModeType.SM_ExactFit; creationParams.IsInitFirstFrame = false; creationParams.IsAutoManageViewport = false; // Has the user specified a movie subclass? if (movieClassType != null) { SFManager sfMgr = camera.GetSFManager(); RTTMovie = Activator.CreateInstance(movieClassType, sfMgr, creationParams) as Movie; if (RTTMovie != null) { RTTMovie.SetRTT(this); } return true; } } } return false; }
/// <summary> /// Creates a movie instance according to the specified movie creation parameters. /// </summary> /// <param name="creationParams"> Movie Creation Parameters such as viewport size, type of actionscript VM to initialize.</param> /// <returns>C++ movie pointer cast as an integer. </returns> public long CreateInstance(SFMovieCreationParams creationParams) { if (pMovieDef == IntPtr.Zero) { return(0); } long movieId = 0; if (pCreationParams == IntPtr.Zero) { int cpSize = Marshal.SizeOf(typeof(SFMovieCreationParams)); pCreationParams = Marshal.AllocCoTaskMem(cpSize); Marshal.StructureToPtr(CreationParams, pCreationParams, false); } #if UNITY_WP8 movieId = Movie.sf_createMovieInstance(pMovieDef, pCreationParams); #else movieId = Movie.SF_CreateMovieInstance(pMovieDef, pCreationParams); #endif // Marshal.DestroyStructure(pCreationParams, typeof(SFMovieCreationParams)); return(movieId); }
protected virtual ScaleformMovie createMovie(SFMovieCreationParams creationParams) { return new ScaleformMovie(this, scaleformCamera, creationParams); }
/* public T CreateMovie <T> (SFMovieCreationParams params) where T : Movie { Activator.CreateInstance (typeof (T), argslist); } */ public Movie CreateMovie(SFMovieCreationParams creationParams, Type MovieClassType) { Type[] argTypes = new Type[]{typeof(SFManager), typeof(SFMovieCreationParams)}; object[] argVals = new object[] {this, creationParams}; ConstructorInfo cInfo = MovieClassType.GetConstructor(argTypes); // Console.WriteLine(MovieClassType); // Console.WriteLine(cInfo); if (cInfo == null) { return null; } Movie movie = (Movie)cInfo.Invoke(argVals); return movie; }
/// <summary> /// Creates a movie definition from a given movie name. The movie name must be the absolute pathname of the SWF or GFX file on the system. /// </summary> /// <param name="movieName"> Moviename corresponds to the absolute pathname of the swf/gfx file on the system.</param> public MovieDef(SFMovieCreationParams creationParams) { // This is not yet implemented. pMovieDef = IntPtr.Zero; }