Exemple #1
0
 private void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         instance = this;
     }
 }
 public void DoSetup(GameRunningState state)
 {
     firstPhase = (Phase)Instantiate(state.firstPhase);
     Debug.Log("Created firstPhase: " + firstPhase.name);
     mourning = (Phase)Instantiate(state.mourning);
     thePlayer = (PlayerController)Instantiate(state.player);
     level = (Transform)Instantiate(state.level);
     level.SendMessage("Setup");
     messageGUI = (MessageGUI)Instantiate(state.messageGUI);
     scoreGUI = (ScoreGUI)Instantiate(state.scoreGUI);
     spawner = level.GetComponent<Spawner>();
     currentPhase = firstPhase;
     ChangePhase(firstPhase);
 }
 public MyMessageBoxView(MessageGUI messageGUI)
 {
     InitializeComponent();
     BindingContext = new MyMessageBoxViewModel(messageGUI);
 }
 public MyMessageBoxViewModel(MessageGUI messageGUI)
 {
     this.MessageGUI = messageGUI;
 }