public Table(ViewportUtils view, PackedScene piles) { this.view = view; this.piles = piles; view.OnViewportResize += new ViewportUtils.OnViewportResizeDelegate(OnViewportResize); }
public override void _Ready() { viewUtils = new ViewportUtils(GetViewport()); viewUtils.OnViewportResize += new ViewportUtils.OnViewportResizeDelegate(OnViewportResize); table = new Table(viewUtils, Piles); deck = new Deck(viewUtils, Cards); cardPositions = new CardPositions(viewUtils); VisualServer.SetDefaultClearColor(BackgroundColor); }
public CardPositions(ViewportUtils viewport) { this.viewport = viewport; for (int i = 0; i < 4; i++) { foundationCards.Add(new List <Card>(13)); } for (int i = 0; i < 7; i++) { tableauCards.Add(new List <Card>(13)); } }
void Start() { character = GameObject.FindGameObjectWithTag("Character").GetComponent <Character>(); ball = GameObject.FindGameObjectWithTag("Ball").GetComponent <Ball>(); vu = GameObject.FindGameObjectWithTag("Utils").GetComponent <ViewportUtils>(); //Ball highestPosY = ball.rb.position.y; //Set transform scale transform.localScale = new Vector3(vu.cameraWidth, vu.cameraHeight, 1); //Set tiling renderer.material.SetTextureScale("_MainTex", new Vector2(vu.cameraWidth, vu.cameraHeight)); // topMargin = 1.5f + ball.getRadius(); }
public Deck(ViewportUtils viewport, PackedScene cardsScene) { this.cardsScene = cardsScene; this.viewport = viewport; this.viewport.OnViewportResize += new ViewportUtils.OnViewportResizeDelegate(OnViewportResize); }
void Start() { vu = GameObject.FindGameObjectWithTag("Utils").GetComponent <ViewportUtils>(); }