Esempio n. 1
0
    public void OverwriteSDraft(Vector2 p1, Vector2 p2, string sName)
    {
        float mNormalized = setMagnitude(p1, p2, _unitProvider.GetCurrentUnitMagnitude());

        switch (sName)
        {
        case SEGNAME.A1:
            _rDS.rDraft._a1p1 = p1;
            _rDS.rDraft._a1p2 = p2;
            _rDS.rDraft._a1m  = mNormalized;
            break;

        case SEGNAME.A2:
            _rDS.rDraft._a2p1 = p1;
            _rDS.rDraft._a2p2 = p2;
            _rDS.rDraft._a2m  = mNormalized;
            break;

        case SEGNAME.B1:
            _rDS.rDraft._b1p1 = p1;
            _rDS.rDraft._b1p2 = p2;
            _rDS.rDraft._b1m  = mNormalized;
            break;

        case SEGNAME.B2:
            _rDS.rDraft._b2p1 = p1;
            _rDS.rDraft._b2p2 = p2;
            _rDS.rDraft._b2m  = mNormalized;
            break;

        case SEGNAME.C1:
            _rDS.rDraft._c1p1 = p1;
            _rDS.rDraft._c1p2 = p2;
            _rDS.rDraft._c1m  = mNormalized;
            break;

        case SEGNAME.C2:
            _rDS.rDraft._c2p1 = p1;
            _rDS.rDraft._c2p2 = p2;
            _rDS.rDraft._c2m  = mNormalized;
            break;

        case SEGNAME.D1:
            _rDS.rDraft._d1p1 = p1;
            _rDS.rDraft._d1p2 = p2;
            _rDS.rDraft._d1m  = mNormalized;
            break;

        case SEGNAME.D2:
            _rDS.rDraft._d2p1 = p1;
            _rDS.rDraft._d2p2 = p2;
            _rDS.rDraft._d2m  = mNormalized;
            break;
        }
    }
Esempio n. 2
0
    void TryEnableBtnRegionScene()
    {
        int iVote = 0;

        if (_unitProvider.GetCurrentUnitMagnitude() > 0f)
        {
            ++iVote;
        }
        if (_imgProvider.CurrentImgUrlBothExist())
        {
            ++iVote;
        }

        if (_regionProvider.GetCurrentUrl() == GetCurrentUrl())
        {
            ++iVote;
        }

        if (iVote >= 3)
        {
            BtnToRegionScene.interactable = true;
        }
        else
        {
            BtnToRegionScene.interactable = false;
        }
    }