public Compass(int cell) { Copy(Icons.COMPASS.Get()); Origin.Set(Width / 2, Radius); _cell = cell; _cellCenter = DungeonTilemap.TileCenterToWorld(cell); Visible = false; }
public Sink(int pos) { _pos = pos; var p = DungeonTilemap.TileCenterToWorld(pos); Pos(p.X - 2, p.Y + 1, 4, 0); Pour(_factory, 0.05f); }
public Smoke(int pos) { _pos = pos; var p = DungeonTilemap.TileCenterToWorld(pos); Pos(p.X - 4, p.Y - 2, 4, 0); Pour(Factory, 0.2f); }
public Torch(int pos) { _pos = pos; var p = DungeonTilemap.TileCenterToWorld(pos); Pos(p.X - 1, p.Y + 3, 2, 0); Pour(FlameParticle.Factory, 0.15f); Add(new Halo(16, 0xFFFFCC, 0.2f).Point(p.X, p.Y)); }
public override void OnComplete(Animation anim) { base.OnComplete(anim); if (anim != AttackAnimation) { return; } if (Dungeon.Visible[Ch.pos] || Dungeon.Visible[_attackPos]) { Parent.Add(new DeathRay(Center(), DungeonTilemap.TileCenterToWorld(_attackPos))); } }
protected internal override Item AffectItem(Item item) { if (item.Identified) { return(null); } item.Identify(); Badge.ValidateItemLevelAquired(item); Emitter.Parent.Add(new Identification(DungeonTilemap.TileCenterToWorld(Pos))); Journal.Remove(Journal.Feature.WELL_OF_AWARENESS); return(item); }
public virtual void Reset(int from, int to, ICallback callback) { _callback = callback; Revive(); var pf = DungeonTilemap.TileCenterToWorld(from); var pt = DungeonTilemap.TileCenterToWorld(to); x = pf.X; y = pf.Y; Width = 0; Height = 0; var d = PointF.Diff(pt, pf); var speed = new PointF(d).Normalize().Scale(Speed); _sx = speed.X; _sy = speed.Y; _time = d.Length / Speed; }
protected internal override bool AffectHero(Hero hero) { Sample.Instance.Play(Assets.SND_DRINK); Emitter.Parent.Add(new Identification(DungeonTilemap.TileCenterToWorld(Pos))); hero.Belongings.Observe(); for (var i = 0; i < Level.Length; i++) { var terr = Dungeon.Level.map[i]; if ((Terrain.Flags[terr] & Terrain.SECRET) == 0) { continue; } Level.Set(i, Terrain.discover(terr)); GameScene.UpdateMap(i); if (Dungeon.Visible[i]) { GameScene.DiscoverTile(i, terr); } } Buff.Affect <Awareness>(hero, Awareness.Duration); Dungeon.Observe(); Dungeon.Hero.Interrupt(); GLog.Positive(TXT_PROCCED); Journal.Remove(Journal.Feature.WELL_OF_AWARENESS); return(true); }
protected internal override void Fx(int cell, ICallback callback) { cell = Ballistica.Trace[Math.Min(Ballistica.Distance, Distance()) - 1]; CurUser.Sprite.Parent.Add(new DeathRay(CurUser.Sprite.Center(), DungeonTilemap.TileCenterToWorld(cell))); callback.Call(); }
public static void At(int cell, Color color, int n) { At(DungeonTilemap.TileCenterToWorld(cell), color, n); }