예제 #1
0
 internal MovieClip(RootMovieClip root, Sprite sprite, DisplayObject container)
     : base(root, container)
 {
     _sprite = sprite;
     IsPlaying = true;
     DontLoop = false;
 }
예제 #2
0
파일: Button.cs 프로젝트: kaldap/XnaFlash
        internal Button(RootMovieClip root, ButtonInfo info, DisplayObject container)
            : base(root, container)
        {
            _button = info;

            CurrentState = State.Over;
            SetButtonState(State.Up);
            LoadActions();
        }
예제 #3
0
파일: Flash.cs 프로젝트: kaldap/XnaFlash
        private Flash(Game game, IServiceProvider services, FlashDocument document, int surfaceWidth, int surfaceHeight)
            : base(null)
        {
            if (document == null) throw new ArgumentNullException("document");
            if (services == null) throw new ArgumentNullException("services");

            ISystemServices system = (ISystemServices)services.GetService(typeof(ISystemServices));
            if (system == null) throw new InvalidOperationException("Flash can be used only with ISystemServices registered!");

            _surface = system.VectorDevice.CreateSurface(surfaceWidth, surfaceHeight, SurfaceFormat.Color);
            Root = new RootMovieClip(document, system);
            SurfaceSize = new Vector2(surfaceWidth, surfaceHeight);
            SizeInTwips = new Vector2(document.Width, document.Height);
        }
예제 #4
0
        public GlobalScope(RootMovieClip root)
        {
            _root = root;

            // Auto native methods
            foreach (var fun in NativeActionFunc.CreateFunctions(GetType().Assembly))
                this[fun.Key] = fun.Value;
            foreach (var fun in NativeActionFunc.CreateFunctions(Assembly.GetExecutingAssembly()))
                this[fun.Key] = fun.Value;

            // Manual native methods
            // Classes
            // Variables
            this["_root"] = root;
            this["_global"] = this;
        }
예제 #5
0
        internal StageObject(RootMovieClip root, DisplayObject container)
        {
            _container = container;

            Root = root;
            Parent = null;
            Visible = true;
            Context = new ActionContext
            {
                Constants = null,
                DefaultTarget = this,
                Registers = new ActionVar[4],
                RootClip = Root,
                Scope = new LinkedList<ActionObject>(),
                Stack = new Stack<ActionVar>(),
                This = this
            };
            if (Root != null) Context.Scope.AddFirst(Root.GlobalScope);
            Context.Scope.AddLast(this);
        }
예제 #6
0
 public Movie.IDrawable MakeInstance(Movie.DisplayObject container, RootMovieClip root)
 {
     return new Button(root, this, container);
 }
예제 #7
0
 public Movie.IDrawable MakeInstance(Movie.DisplayObject container, RootMovieClip root)
 {
     return null;
 }
예제 #8
0
파일: Sprite.cs 프로젝트: kaldap/XnaFlash
 Movie.IDrawable ICharacter.MakeInstance(DisplayObject container, RootMovieClip root)
 {
     return new Movie.MovieClip(root, this, container);
 }