Пример #1
0
    public void RespawnPlayer()
    {
        isRespawning = true;

        playerData = SaveSystem.LoadPlayer();

        player.transform.position = new Vector3(playerData.playerPosition[0], playerData.playerPosition[1], playerData.playerPosition[2]);
        player.SetActive(true);

        playerStats.UpdateHealth(playerData.playerHealth);

        playerStats.GetKey("Yellow Key", playerData.yellowKey);
        playerStats.GetKey("Blue Key", playerData.blueKey);
        playerStats.GetKey("Red Key", playerData.redKey);

        if (!playerData.yellowKey && !YellowKey.activeSelf)
        {
            YellowKey.SetActive(true);
            YellowKey.GetComponent <Animator> ().SetBool("Taken", false);
        }

        if (!playerData.blueKey && !BlueKey.activeSelf)
        {
            BlueKey.SetActive(true);
            BlueKey.GetComponent <Animator> ().SetBool("Taken", false);
        }

        if (!playerData.redKey && !RedKey.activeSelf)
        {
            RedKey.SetActive(true);
            RedKey.GetComponent <Animator> ().SetBool("Taken", false);
        }
    }
Пример #2
0
 public BloombergInstrument Define(NonEmptyString ticker, PricingSource pricingSource, YellowKey yellowKey)
 {
     GenerateEvent(BloombergInstrumentCreated(ticker, pricingSource, yellowKey));
     GenerateEvent(InstrumentCreated(Vendor.Bloomberg, $"{ticker} {pricingSource} {yellowKey}".NonEmpty(), true));
     return(this);
 }