示例#1
0
        public LWF(Data lwfData, IRendererFactory r)
#endif
        {
            m_data = lwfData;

            interactive     = m_data.buttonConditions.Length > 0;
            m_frameRate     = m_data.header.frameRate;
            m_execLimit     = 3;
            m_frameSkip     = true;
            m_tick          = 1.0f / m_frameRate;
            m_roundOffTick  = m_tick * ROUND_OFF_TICK_RATE;
            m_attachVisible = true;
            m_interceptByNotAllowOrDenyButtons = true;
            m_intercepted             = false;
            scaleByStage              = 1.0f;
            m_needsUpdate             = false;
            m_needsUpdateForAttachLWF = false;
            m_pointX     = Single.MinValue;
            m_pointY     = Single.MinValue;
            m_pressing   = false;
            m_instanceId = ++m_instanceOffset;
            m_alive      = true;
#if LWF_USE_LUA
            m_luaState         = l;
            m_instanceIdString = instanceId.ToString();
            InitLua();
#endif

            if (!interactive && m_data.frames.Length == 1)
            {
                DisableExec();
            }

            m_property  = new Property(this);
            m_instances = new IObject[m_data.instanceNames.Length];
            InitEvent();
            m_movieCommands             = new MovieCommands();
            m_programObjectConstructors =
                new ProgramObjectConstructor[m_data.programObjects.Length];
            m_textDictionary = new TextDictionary();

            m_matrix                 = new Matrix();
            m_matrixIdentity         = new Matrix();
            m_execMatrix             = new Matrix();
            m_colorTransform         = new ColorTransform();
            m_colorTransformIdentity = new ColorTransform();
            m_execColorTransform     = new ColorTransform();
            m_blendModes             = new BlendModes();
            m_maskModes              = new MaskModes();

            Init();

            SetRendererFactory(r);
        }
示例#2
0
文件: lwf_core.cs 项目: rayyee/lwf
	public LWF(Data lwfData, IRendererFactory r)
#endif
	{
		m_data = lwfData;

		interactive = m_data.buttonConditions.Length > 0;
		m_frameRate = m_data.header.frameRate;
		m_execLimit = 3;
		m_frameSkip = true;
		m_tick = 1.0f / m_frameRate;
		m_roundOffTick = m_tick * ROUND_OFF_TICK_RATE;
		m_attachVisible = true;
		m_interceptByNotAllowOrDenyButtons = true;
		m_intercepted = false;
		scaleByStage = 1.0f;
		m_needsUpdate = false;
		m_needsUpdateForAttachLWF = false;
		m_pointX = Single.MinValue;
		m_pointY = Single.MinValue;
		m_pressing = false;
		m_instanceId = ++m_instanceOffset;
		m_alive = true;
#if LWF_USE_LUA
		m_luaState = l;
		m_instanceIdString = instanceId.ToString();
		InitLua();
#endif

		if (!interactive && m_data.frames.Length == 1)
			DisableExec();

		m_property = new Property(this);
		m_instances = new IObject[m_data.instanceNames.Length];
		InitEvent();
		m_movieCommands = new MovieCommands();
		m_programObjectConstructors =
			new ProgramObjectConstructor[m_data.programObjects.Length];
		m_textDictionary = new TextDictionary();

		m_matrix = new Matrix();
		m_matrixIdentity = new Matrix();
		m_execMatrix = new Matrix();
		m_colorTransform = new ColorTransform();
		m_colorTransformIdentity = new ColorTransform();
		m_execColorTransform = new ColorTransform();
		m_blendModes = new BlendModes();
		m_maskModes = new MaskModes();

		Init();

		SetRendererFactory(r);
	}