Ejemplo n.º 1
0
    public void MoveDevice(InputDevice device, Team pos)
    {
        switch (pos)
        {
        case Team.Survivors:
            device.transform.SetParent(survivorCont);
            break;

        case Team.Center:
            device.transform.SetParent(centerCont);
            break;

        case Team.Ghosts:
            device.transform.SetParent(ghostCont);
            break;
        }

        SoundManager.I.PlaySound("Bonecrack_01", null);

        var newPos = device.GetComponent <RectTransform>().anchoredPosition;

        newPos.x = 0;
        newPos.y = -100f - device.input.idx * 80f;
        device.GetComponent <RectTransform>().anchoredPosition = newPos;
    }