Exemplo n.º 1
0
    private void TouchDrap(GroundController gc, bool isCover)
    {
        GroundController checkGc = gc;

        Vector2 dir = ConvertDirNormalized(startGc.transform.localPosition, checkGc.transform.localPosition);

        if (IsCorrectDir(dir))
        {
            endGc = gc;

            if (isCover)
            {
                endCover = true;
                endGc.OnCover();
            }
            endGc.ChangeChara(fightController.GetJob("P", (int)charaIdx));

            if (fightController.GetJob("P", (int)charaIdx) == 2)
            {
                endGc.onProtection = OnProtection;
            }

            charaGc.AddLast(endGc);

            CheckGround(false);
            spaceCorrect = true;
        }
        else
        {
            TouchError();
        }
    }
Exemplo n.º 2
0
    private void TouchDown(GroundController gc, bool isCover)
    {
        startGc = gc;
        if (charaIdx != null)
        {
            if (fightController.GetJob("P", (int)charaIdx) == 2)
            {
                startGc.onProtection = OnProtection;
            }

            charaGc.AddLast(startGc);
            if (isCover)
            {
                startCover = true;
                startGc.OnCover();
            }
            startGc.ChangeChara(fightController.GetJob("P", (int)charaIdx));

            startCharaImage = SetChess(startGc);
            endCharaImage   = SetChess(startGc);

            if ((int)gc.GetComponent <GroundController> ()._groundType == 99)
            {
                isResetGround = true;
            }
        }
    }