Beispiel #1
0
    void Start()
    {
        masterScript = GameObject.FindObjectOfType (typeof(MasterScript)) as MasterScript;
        singleplayerScript = GameObject.FindObjectOfType (typeof(Singleplayer)) as Singleplayer;

        video = (MovieTexture)GetComponent<Image> ().material.mainTexture;

        StartCoroutine (this.PlayStory ());
    }
Beispiel #2
0
        public void Init()
        {
            Singleplayer = Utility.GetDependancy <SingleplayerMode>();
            Versus       = Utility.GetDependancy <VersusMode>();
            Multiplayer  = Utility.GetDependancy <MultiplayerMode>();

            Singleplayer.Init();
            Versus.Init();
            Multiplayer.Init();
        }
Beispiel #3
0
    void Start()
    {
        masterScript = GameObject.FindObjectOfType (typeof(MasterScript)) as MasterScript;
        sceneHandlerScript = GameObject.FindObjectOfType (typeof(SceneHandler)) as SceneHandler;
        singleplayerScript = GameObject.FindObjectOfType (typeof(Singleplayer)) as Singleplayer;

        eventSystem = EventSystem.current;

        eventSystem.SetSelectedGameObject(firstSelectElement);

        singleplayerScript.SetWinner (1);
    }
Beispiel #4
0
        public SingleplayerPage()
        {
            InitializeComponent();
            singleplayer = new Singleplayer();
            DataContext  = singleplayer;

            play = new BitmapImage();
            play.BeginInit();
            play.UriSource = new Uri("../Resources/Images/Play.png", UriKind.Relative);
            play.EndInit();

            pause = new BitmapImage();
            pause.BeginInit();
            pause.UriSource = new Uri("../Resources/Images/Pause.png", UriKind.Relative);
            pause.EndInit();
        }
Beispiel #5
0
    void Awake()
    {
        masterScript = GameObject.FindObjectOfType (typeof(MasterScript)) as MasterScript;
        sceneHandlerScript = GameObject.FindObjectOfType (typeof(SceneHandler)) as SceneHandler;

        singleplayer = (masterScript.GetPlayerType (2) == "Ai") ? true : false;
        if (singleplayer) singleplayerScript = GameObject.FindObjectOfType (typeof(Singleplayer)) as Singleplayer;

        eventSystem = EventSystem.current;

        gameScript = GameObject.FindObjectOfType (typeof(Game)) as Game;

        healthBarP1 = matchUI.transform.FindChild ("Health_P1").FindChild ("healthbar").GetComponent<Image> ();
        healthBarP2 = matchUI.transform.FindChild ("Health_P2").FindChild ("healthbar").GetComponent<Image> ();
        energyBarP1 = matchUI.transform.FindChild ("Energy_P1").FindChild ("specialbar").GetComponent<Image> ();
        energyBarP2 = matchUI.transform.FindChild ("Energy_P2").FindChild ("specialbar").GetComponent<Image> ();
    }
Beispiel #6
0
 public PauseCommand(Singleplayer ViewModel)
 {
     this.ViewModel = ViewModel;
 }
Beispiel #7
0
    void Awake()
    {
        masterScript = GameObject.FindObjectOfType (typeof(MasterScript)) as MasterScript;
        sceneHandlerScript = GameObject.FindObjectOfType (typeof(SceneHandler)) as SceneHandler;

        singleplayer = (masterScript.GetPlayerType (2) == "Ai") ? true : false;
        if (singleplayer) singleplayerScript = GameObject.FindObjectOfType (typeof(Singleplayer)) as Singleplayer;

        StartCoroutine (SpawnGameObjects ());

        minBallSpeed = ballSpeedUpCurve.Evaluate (0.0f);
        maxBallSpeed = ballSpeedUpCurve.Evaluate (1.0f);
        ballSpeed = minBallSpeed;
    }
Beispiel #8
0
 public MoveRightCommand(Singleplayer ViewModel)
 {
     this.ViewModel = ViewModel;
 }
Beispiel #9
0
 public StopCommand(Singleplayer ViewModel)
 {
     this.ViewModel = ViewModel;
 }
    void Start()
    {
        masterScript = GameObject.FindObjectOfType (typeof(MasterScript)) as MasterScript;
        sceneHandlerScript = GameObject.FindObjectOfType (typeof(SceneHandler)) as SceneHandler;
        singleplayerScript = GameObject.FindObjectOfType (typeof(Singleplayer)) as Singleplayer;

        eventSystem = EventSystem.current;

        crystalUnlocked = singleplayerScript.GetCrystalUnlockStatus ();

        for (int i = 0; i < crystalCount.Count; ++i) {
            crystalCount [i].text = "" + singleplayerScript.GetStartCrystalCount (i + 1);
            if (int.Parse (crystalCount [i].text) <= 0) {
                crystalCount [i].text = "" + 0;
                crystalCount [i].color = new Color32 (169, 0, 0, 255);

                temple [i].transform.FindChild ("1").gameObject.SetActive (false);
                temple [i].transform.FindChild ("0").gameObject.SetActive (true);
            }
        }

        StartCoroutine (this.UnlockSpecial ());
    }