Пример #1
0
 void Start()
 {
     CheckPointManager.getInstance().onRestart          += OnRestart;
     CheckPointManager.getInstance().onCheckPointChange += OnCheckPointChange;
     updateState();
     existAtLastCheckPoint = CheckPointManager.getInstance().isSceneStart();
 }
 public void resetScene()
 {
     princesse.GetComponent <Animator>().SetBool("IsDead", false);
     princesse.GetComponent <PrincesseDeplacement>().UnlockPrincesse();
     princesse.GetComponent <PrincesseVie>().PlayOneTimeDie = false;
     for (int i = 1; i < listTransform.Length; i++)
     {
         listTransform[i].gameObject.SetActive(false);
     }
     CheckPointManager.getInstance().restartCheckPoint();
     Cursor.visible = false;
 }
Пример #3
0
    // Activation du checkPoint
    public void trigger()
    {
        Debug.Log("CheckPoint \" " + gameObject.name + "\" atteint");

        this.triggered = true;

        CheckPointManager.getInstance().OnCheckPointTriggered();

        if (onTrigger != null)
        {
            onTrigger();                // on notifit de l'activation d'un nouveau checkPoint
        }
    }
Пример #4
0
 // Use this for initialization
 void Start()
 {
     sm = GameObject.FindGameObjectWithTag("SoundManager").GetComponent <SoundManager>();
     sm.setBackgroundMusic(sm.listeClips[NumberMusicSM]);
     CheckPointManager.getInstance().onRestart += OnRestart;
 }
Пример #5
0
 void OnDestroy()
 {
     CheckPointManager.getInstance().onRestart          -= OnRestart;
     CheckPointManager.getInstance().onCheckPointChange -= OnCheckPointChange;
 }
 void Start()
 {
     CheckPointManager.getInstance().onRestart += OnRestart;
 }