public IEnumerator RevealCards(RevealCardsCallback callback) { yield return(hand.HideHand()); while (true) { if (DrawStack.Count == 0) { if (rubbishStack.Count == 0) { break; } rubbishStack.MoveAllCardsToStack(DrawStack, false); yield return(DrawStack.Shuffle()); yield return(new WaitForSeconds(DrawStack.audio.clip.length)); } Card card = DrawStack.Pop(); iTween.MoveTo(card.gameObject, new Vector3(-37, 72.57f, -495.44f), 0.5f); iTween.RotateTo(card.gameObject, new Vector3(320.0f, 180.0f, 180.0f), 0.5f); yield return(new WaitForSeconds(0.5f)); if (callback(card, this)) { yield return(new WaitForSeconds(1)); break; } yield return(new WaitForSeconds(1)); } yield return(hand.ShowHand()); }
public override void Remove() { foreach (var drawable in Drawables.Drawables) { DrawStack.Pop(drawable); } base.Remove(); }
internal void DestroyDrawable(Drawable drawable, DrawStack drawStack) { if (drawStack != null) { drawStack.Pop(drawable); } drawable.Cleanup(); }
public override void Draw() { Canvas.Clear(Color.Black); DrawStack.Draw(Canvas); DrawableScore.Draw(Canvas); for (int i = 0; i < Player.EntityData.Health; i++) { Canvas.DrawImage(Player.HealthTexture, new Vec2(Window.Size.X - (((Player.HealthTexture.Size.X * 0.5 + 15) * i) + 15 + Player.HealthTexture.Size.X), 25), scale: new Vec2(0.5)); } Canvas.Present(); }
public override void Draw() { Canvas.Clear(Color.DarkGreen); DrawStack.Draw(Canvas); Canvas.DrawText(LoadedFont, $"Score: {Game.Score}", new Vec2(15, 15), color: Color.Green); for (int i = 0; i < Player.EntityData.Health; i++) { Canvas.DrawImage(Player.HealthTexture, new Vec2(Window.Size.X - (((Player.HealthTexture.Size.X * 0.5 + 15) * i) + 15 + Player.HealthTexture.Size.X), 25), scale: new Vec2(0.5)); } Canvas.Present(); }
internal D CreateDrawable <D>(object obj, DrawStack drawStack) where D : Drawable, new() { Logger.Log(LogLevel.Ludacris, $"Creating Drawable of type '{typeof(D).FullName}' into {obj.GetType().FullName}"); var drawable = new D() { Entity = obj as Entity }; InitializeObject(drawable, obj); drawable.Initialize(); if (drawStack != null) { drawStack.Push(drawable); } return(drawable); }
public IGraphicsService AddDrawStack(string ID, int Size = 100) { _drawStacks[ID] = new DrawStack(ID, Size); return(this); }
public override void Draw() { DrawStack.Draw(Canvas); }