示例#1
0
    void carryPlate(PlateSpawner ps)
    {
        if (ps.havePlate == false)
        {
            return;
        }

        Transform t = ps.getPlate();

        plates.Add(t);
        t.SetParent(platesHolder);
        t.localPosition = Vector3.zero;
        t.localRotation = Quaternion.identity;
        t.localPosition = t.up * 0.1f * (plates.Count - 1);
    }
示例#2
0
    void CarryPlate(PlateSpawner ps)
    {
        if (playerState == PLAYERSTATE.Dodged)
        {
            return;
        }

        if (joyStick.minDisMoved(minInputDistance))
        {
            playerState = PLAYERSTATE.CarryRun;
        }
        else
        {
            playerState = PLAYERSTATE.CarryIdle;
        }

        Transform t = ps.getPlate();

        plates.Add(t);
        t.SetParent(platesHolder);
        t.localPosition = Vector3.zero;
        t.localRotation = Quaternion.identity;
        t.localPosition = t.up * plateStackDistance * (plates.Count - 1);
    }