Beispiel #1
0
    public void Relocate()
    {
        if (blink != null)
        {
            blink.Run();
            return;
        }
//        var locators = FindObjectsOfType<Locator>().ToList();
//        if (locators.Count > 0) {
//            locators.Rnd().LocateHere(this);
//            return;
//        }
        var trajectoryPosition = Position.figures.FirstOrDefault(f => f is TrajectoryPosition) as TrajectoryPosition;

        if (trajectoryPosition != null)
        {
            trajectoryPosition.trajectory.positions.CyclicNext(trajectoryPosition).position.MoveHere(this);
            return;
        }
        Blink();
    }