private void Init(bool bAutoSetParent) { m_aChildrenToRemove = new ArrayList(); m_plChildrenByHash = new Hashtable(); this._slChildrenLocZSorted = new SortedFloatList(); m_sID = ""; m_nInk = (int)RasterOps.ROPs.Copy; m_nBlend = 255; m_matrix = new Matrix4(); m_vPivot = new Vector3(); m_fLocZ = 0.0f; m_pntLoc = new EPointF(0.0f, 0.0f); m_pntScale = new EPointF(1.0f, 1.0f); m_pntRegPoint = new EPoint(0, 0); m_rctSrcClip = new ERectangle(0, 0, 1, 1); m_clr = Color.White; m_rctDstParent = new ERectangleF(0, 0, 0, 0); m_aBehaviors = new ArrayList(); m_nMemberAnimFrame = 0; m_dtChildren = new DataTable(); m_dtChildren.Columns.Add("Name", typeof(System.String)); m_dtChildren.Columns.Add("LocZ", typeof(System.Double)); m_dtChildren.Columns.Add("Hash", typeof(System.Int32)); m_pntMouseDown = new EPoint(); m_pntMouseLast = new EPoint(); _pntMouse = new EPoint(); if (bAutoSetParent && m_endogine != null && m_endogine.Stage != null) { Parent = m_endogine.Stage.DefaultParent; } m_renderStrategy = m_endogine.Stage.CreateRenderStrategy(); m_renderStrategy.SetEndogine(m_endogine); m_renderStrategy.SetSprite(this); m_renderStrategy.Init(); //TODO: make this optional (takes some resources) Sprite[] lcs = new Sprite[1]; lcs[0] = this; EH.Instance.LatestCreatedSprites = lcs; }
private void Init(bool bAutoSetParent) { m_aChildrenToRemove = new ArrayList(); m_plChildrenByHash = new Hashtable(); this._slChildrenLocZSorted = new SortedFloatList(); m_sID = ""; m_nInk = (int)RasterOps.ROPs.Copy; m_nBlend = 255; m_matrix = new Matrix4(); m_vPivot = new Vector3(); m_fLocZ = 0.0f; m_pntLoc = new EPointF(0.0f, 0.0f); m_pntScale = new EPointF(1.0f, 1.0f); m_pntRegPoint = new EPoint(0,0); m_rctSrcClip = new ERectangle(0,0,1,1); m_clr = Color.White; m_rctDstParent = new ERectangleF(0,0,0,0); m_aBehaviors = new ArrayList(); m_nMemberAnimFrame = 0; m_dtChildren = new DataTable(); m_dtChildren.Columns.Add("Name", typeof(System.String)); m_dtChildren.Columns.Add("LocZ", typeof(System.Double)); m_dtChildren.Columns.Add("Hash", typeof(System.Int32)); m_pntMouseDown = new EPoint(); m_pntMouseLast = new EPoint(); _pntMouse = new EPoint(); if (bAutoSetParent && m_endogine!=null && m_endogine.Stage != null) Parent = m_endogine.Stage.DefaultParent; m_renderStrategy = m_endogine.Stage.CreateRenderStrategy(); m_renderStrategy.SetEndogine(m_endogine); m_renderStrategy.SetSprite(this); m_renderStrategy.Init(); //TODO: make this optional (takes some resources) Sprite[] lcs = new Sprite[1]; lcs[0] = this; EH.Instance.LatestCreatedSprites = lcs; }