Beispiel #1
0
    public void InitToMoveEntity()
    {
        currentSpeed = 0;
        next         = null;

        if (!squareData.disused && entity != null)
        {
            SetupNext();

            if (squareData.squareType == SquareType.Generator)
            {
//				ReplaceEntity();
                ChangeToGeneratorState();
            }
            else if (next != null && squareData.squareType == SquareType.Normal && next.entity == null)
            {
                next.entity = entity;
                next.entity.SetParent(next);
                next.ChangeToMovingState(currentSpeed);
                entity = null;
            }
        }
    }