public override void Update() { if (spark != null) { spark.Update(); if (spark.dead) { spark = null; } } if (box == ContentChest.Instance.smallBox) { boxType = BoxType.BIG; } else if (box == ContentChest.Instance.bigBox) { boxType = BoxType.SMALL; } else if (box == ContentChest.Instance.fragileBox) { boxType = BoxType.FRAGILE; } if (GameConstants.BoxConveyerRunning) { position.X -= .5f; bounds.X = (int)position.X; drawRect.X = (int)position.X; } }
public bool Package() { if (!packaged) { spark = new Spark(new Vector2(drawRect.X, drawRect.Y)); packaged = true; if (boxType == BoxType.BIG) { box = ContentChest.Instance.smallBoxPackaged; } else if (boxType == BoxType.SMALL) { box = ContentChest.Instance.bigBoxPackaged; } else if (boxType == BoxType.FRAGILE) { box = ContentChest.Instance.fragileBoxPackaged; } return(true); } return(false); }