示例#1
0
    private void Start()
    {
        Cursor.lockState = CursorLockMode.None;
        Cursor.visible   = true;
        HatID            = PlayerPrefs.GetInt("HatID");
        EyeID            = PlayerPrefs.GetInt("EyeID");
        LobbyTiles.ResetStaticLists();
        Player_Colors.PlayerMaterials.Clear();

        HatContainer.sprite = Hats[HatID];
        EyeContainer.sprite = Eyes[EyeID];

        Y_Toggle.isOn = PlayerSettings.Mouse_Y_Invert;
    }
示例#2
0
    private void MaterialCallBack()
    {
        var mat = Player_Colors.GetColor(state.UserColor);        // player colors gets any color material based off a string

        foreach (var limb in PlayerLimbs)
        {
            limb.material = mat;                    // paint the characters
        }
        if (entity.IsOwner)
        {
            //FindObjectOfType<Inventory>().InitializeInventory(PlayerGraphics.material.color);
            state.UserColorData = mat.color;
        }
        LobbyTiles.AddPlayer(gameObject, PlayerGraphics.material.color, state.UserColor);            // remove this key
    }