void Start()
 {
     if (Model.Instance.previousScene == "ChambreNuit")
     {
         bob.transform.position   = new Vector3(-14.28f, -0.95f, -3f);
         bob.transform.localScale = new Vector2(1, 1);
     }
     else if (Model.Instance.previousScene == "SalleDeBainNuit")
     {
         bob.transform.position = new Vector3(-12.4f, -0.95f, -3f);
     }
     else if (Model.Instance.previousScene == "CuisineSalonMatin")
     {
         SoundScript.playNight();
         SoundScript.FadeIn();
     }
 }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        fader           = ui.GetComponent <Fading>();
        dialog          = ui.GetComponent <Dialog>();
        bob             = bobGO.GetComponent <Bob>();
        bob.inputEnable = false;

        if (Model.Instance.previousScene == "ChambreNuit" || Model.Instance.previousScene == "Intro")
        {
            dialogDisplayed = false;
            SoundScript.playDay();
            SoundScript.FadeIn();
        }
        else
        {
            Debug.Log("From Salon");
            dialogDisplayed          = true;
            bob.inputEnable          = true;
            bob.transform.position   = new Vector3(4.4f, -0.9f, -3f);
            bob.transform.localScale = new Vector2(-1, 1);
        }
    }