Exemple #1
0
    private void SpawnPlayer(int playerIndex)
    {
        GameObject playerObj = Instantiate(PREFAB_PLAYER, spawnPoints[playerIndex].position, Quaternion.identity);
        Player     player    = playerObj.GetComponent <Player>();

        player.Initialize(this, playerIndex);

        PaletteSwap palette = playerObj.GetComponent <PaletteSwap>();

        palette.SetColors(skinColor, playerColors[playerIndex], pantsColor, 0.1f);
    }
Exemple #2
0
 private void SetBiomePalette()
 {
     if (biome == Biomes.DEFAULT)
     {
         palette.SetColors(DEFAULT_PALETTE);
     }
     else if (biome == Biomes.HELL)
     {
         palette.SetColors(HELL_PALETTE);
     }
     else if (biome == Biomes.HEAVEN)
     {
         palette.SetColors(HEAVEN_PALETTE);
     }
 }