Esempio n. 1
0
    /// <summary>
    /// Draggin a Way , all below HTypes
    /// DoingNow == H.Trail  || DoingNow == H.BridgeTrail || DoingNow == H.BridgeRoad)
    /// </summary>
    void DrawWay()
    {
        Trail way = Control.CurrentSpawnBuild as Trail;

        if (Input.GetMouseButtonUp(0) && !_isDraggingWay)
        {
            _isDraggingWay = true;
        }
        if (_isDraggingWay)
        {
            if (way.CurrentLoop == H.None)
            {
                way.Drag();
            }
        }
        if (_isDraggingWay && Input.GetMouseButtonUp(0) && way.IsWayOk)
        {
            MouseUp();
            IsDraggingWay = false;
        }
    }