private bool IsLeftEdgeAttracted(MagnetEngine.MagnetInfo magnet) { bool result; if (magnet.IsInInfluenceZone(this.m_Attractable.start, this.m_State, AttractedEdge.Left)) { this.m_ActiveMagnet = magnet; this.m_AttractedEdge = new MagnetEngine.EdgeInfo { time = this.m_Attractable.start, edge = AttractedEdge.Left }; double duration = this.m_Attractable.end - this.m_Attractable.start; this.m_AttractionHandler.OnAttractedEdge(this.m_Attractable, this.m_AttractedEdge.edge, magnet.time, duration); magnet.timeBeforeSnap = magnet.time; magnet.durationBeforeSnap = this.m_Attractable.end - this.m_Attractable.start; result = true; } else { result = false; } return(result); }
public bool IsAttractedBy(MagnetEngine.MagnetInfo magnet, ITimelineState state) { return(magnet != null && magnet.IsInInfluenceZone(this.exitTime, state, this.edge)); }