コード例 #1
0
ファイル: Canvas2DScope.cs プロジェクト: Neio/MonoGame2D
 public TransformScope(StateScope scope, ref Matrix transform, bool overrideTransform)
     : base(scope)
 {
     Canvas2D canvas = ReferredCanvas;
     canvas.PushTransform();
     if (overrideTransform)
     {
         canvas.SetTransform(ref transform);
     }
     else
     {
         canvas.ApplyTransformBefore(ref transform);
     }
 }
コード例 #2
0
ファイル: StateScope.cs プロジェクト: Neio/MonoGame2D
 /// <summary>
 /// Initializes a <see cref="StateScope"/> with a previous scope.
 /// </summary>
 /// <param name="prevScope">The previous scope in scope chain.</param>
 protected StateScope(StateScope prevScope)
 {
     _prevScope = prevScope;
 }