protected void FillNode(XmlNode node, LookToAction target, params IDOMWriterParam[] options) { AddChild(node, "inside", target.Inside.ToString()); if (target.Center) { AddChild(node, "center", target.Center.ToString()); } else { AddChild(node, "direction", target.Direction.x + " " + target.Direction.y); } }
protected override bool CustomChecks() { LookToAction ea = Action as LookToAction; var r = false; if (!ea.Inside || Element.Geometry.InsideInfluence(LatLon)) { if (ea.Center) { r = Holder.player.IsLookingTo(Element.Geometry.Center); } else { r = Holder.player.IsLookingTowards(ea.Direction.ToVector2d()); } } return(r); }