public VictimAnimation(Victim pVictim) : base(RandomAssets.GetRandomVictim(), 4, 1) { SetOrigin(width / 2, height / 2); _victim = pVictim; currentFrame = 0; _lastUpdatedAnimationTime = 0; }
private void CreateRoad(float spawnX = 0.0f, float spawnY = 0.0f) { Road newRoad = new Road(RandomAssets.GetRandomRoad(), this); _floorLayer.AddChild(newRoad); newRoad.SetXY(spawnX, spawnY + ROAD_OFFSET); roadList.Add(newRoad); }
public Victim(Level pLevel, string pFacing) : base(RandomAssets.GetRandomVictim(), 4, 1) { facing = pFacing; if (facing == "up") { rotation = 180; } if (facing == "down") { rotation = 0; } poopedOn = false; //_scrollSpeed = MyGame.GetScrollSpeed(); //_speed = _scrollSpeed * 2; _level = pLevel; SetOrigin(width / 2, height / 2); //x = Utils.Random(width, game.width - width); }