public bool FullAlign(Cloud main, Cloud scanners, int i) { var cloud = FreshCloud(i); var found = cloud.TryAllOrientations(c => TryAlign(main, c)); if (!found) { return(false); } main.AddAll(cloud); scanners.Add(cloud.Offset); return(true); }
private void ExplodeSmoke(Creature creature) { int n = 12; new ScreenShakeRandom(creature.World, 5, 20, LerpHelper.Linear); for (int i = 0; i < n; i++) { float angle = i * MathHelper.TwoPi / n; Vector2 offset = Util.AngleToVector(angle) * 24; new Smoke(creature.World, creature.VisualTarget + offset, Vector2.Zero, angle, 10 + Random.Next(5)); } int radius = 2; Cloud cloud = creature.Tile.Map.AddCloud(map => new CloudSmoke(map)); foreach (var tile in SkillUtil.GetCircularArea(creature, radius)) { cloud.Add(tile, 15); } }