コード例 #1
0
	public void Awake(){
        //platformControllerScript = PlatformController.GetComponent<Spawner> ();
        platform = GameObject.Find("PlatformController");
        platformControllerScript = platform.GetComponent<TestSpawner>();
        player = GameObject.FindGameObjectWithTag("Player");
        playerHealth = player.GetComponent<PlayerHealthController>();
    }
コード例 #2
0
    void Awake()
    {
        // Set up the reference.
        GameObject stui = GameObject.Find("ScoreTextUI");

        scoreText          = stui.GetComponent <Text>();
        platformController = GameObject.Find("PlatformController");
        testSpawner        = platformController.GetComponent <TestSpawner>();
        player             = GameObject.FindGameObjectWithTag("Player");
        playerHealth       = player.GetComponent <PlayerHealthController>();

        problemSolverObject = GameObject.Find("ProblemSolver");



        // Reset the score.
        score = 0;
        GameObject canvas = GameObject.Find("Canvas");

        startAnim = canvas.GetComponent <Animator>();

        GameObject edui = GameObject.Find("FinalScoreText");

        finalScoreText = edui.GetComponent <Text>();
    }
コード例 #3
0
    void Start()
    {
        gameOver    = false;
        testSpawner = GameObject.FindGameObjectWithTag("Respawn").GetComponentInParent <TestSpawner>();

        gameStateManager = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameStateManager>();
        lootManager      = GetComponent <LootManager> ();
    }
コード例 #4
0
            public ParticleTestManager(State stateref)
                : base(stateref, "ParticleTestManager")
            {
                _controlHandler = stateref.GetService <ControlHandler>();
                _body           = new Body(this, "EmitterBody");
                Spawner         = new TestSpawner(this, "Spawner");

                _moveCursor = new GamePadAnalog(this, "MoveCursor", Sticks.Left, PlayerIndex.One);
                _emitButton = new GamepadInput(this, "EmitButton", Buttons.B, PlayerIndex.One);
            }
コード例 #5
0
ファイル: TestSpawner.cs プロジェクト: Lataavin/Lemmikkipeli
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
     //   DontDestroyOnLoad(gameObject);
 }
コード例 #6
0
    void Awake()
    {
        // Setup the UI
        GameObject stui = GameObject.Find("ScoreText");

        scoreText = stui.GetComponent <Text>();
        GameObject edui = GameObject.Find("FinalScoreText");

        finalScoreText = edui.GetComponent <Text>();
        GameObject kText = GameObject.Find("KinectText");

        kinectConnectedText = kText.GetComponent <Text>();
        GameObject oText = GameObject.Find("OculusText");

        oculusConnectedText = oText.GetComponent <Text>();
        GameObject ovrcanvas = GameObject.Find("UICanvas");

        startAnim = ovrcanvas.GetComponent <Animator>();
        score     = 0;
        GameObject es = GameObject.Find("EventSystem");

        lookInput = es.GetComponent <LookInputModule>();


        //Disable Game over Button
        GameObject gameOverButton = GameObject.Find("RestartButton");
        Button     b = gameOverButton.GetComponent <Button>();

        gameOverButton.SetActive(false);

        //Setup Player
        platformController       = GameObject.Find("PlatformController");
        testSpawner              = platformController.GetComponent <TestSpawner>();
        player                   = GameObject.Find("FPSPreFab");
        infinitePlayerController = player.GetComponent <InfinitePlayerController>();
        playerHealth             = player.GetComponent <PlayerHealthController>();

        //Setup Kinect
        bodyManagerComponent = bodyManager.GetComponent <BodySourceManager>();
        handManagerComponent = handController.GetComponent <HandGestureTrigger>();

        //Setup Oculus
        GameObject ovrCameraRig = GameObject.Find("OVRCameraRig");

        oculusOVRManager = ovrCameraRig.GetComponent <OVRManager>();

        problemSolverObject = GameObject.Find("ProblemSolver");
    }
コード例 #7
0
	//SEPERATED
	//private TestPlatformController platformControllerScript; 
	// Use this for initialization
	void Start () {
		platformControllerScript = GameObject.Find ("PlatformController").GetComponent<TestSpawner> (); 
		
	}
コード例 #8
0
 //SEPERATED
 //private TestPlatformController platformControllerScript;
 // Use this for initialization
 void Start()
 {
     platformControllerScript = GameObject.Find("PlatformController").GetComponent <TestSpawner> ();
 }
コード例 #9
0
            public ParticleTestManager(State stateref)
                : base(stateref, "ParticleTestManager")
            {
                _controlHandler = stateref.GetService<ControlHandler>();
                _body = new Body(this, "EmitterBody");
                Spawner = new TestSpawner(this, "Spawner");

                _moveCursor = new GamePadAnalog(this, "MoveCursor", Sticks.Left, PlayerIndex.One);
                _emitButton = new GamepadInput(this, "EmitButton", Buttons.B, PlayerIndex.One);
            }
コード例 #10
0
    void Awake()
    {
        // Set up the reference.
        GameObject stui = GameObject.Find ("ScoreTextUI");
        scoreText = stui.GetComponent<Text>();
        platformController = GameObject.Find("PlatformController");
        testSpawner = platformController.GetComponent<TestSpawner>();
        player = GameObject.FindGameObjectWithTag("Player");
        playerHealth = player.GetComponent<PlayerHealthController>();

        problemSolverObject = GameObject.Find ("ProblemSolver");

        // Reset the score.
        score = 0;
        GameObject canvas = GameObject.Find("Canvas");
        startAnim = canvas.GetComponent<Animator>();

        GameObject edui = GameObject.Find("FinalScoreText");
        finalScoreText = edui.GetComponent<Text>();
    }
コード例 #11
0
    void Awake ()
	{
		// Setup the UI
        GameObject stui = GameObject.Find("ScoreText");
        scoreText = stui.GetComponent<Text>();
        GameObject edui = GameObject.Find("FinalScoreText");
        finalScoreText = edui.GetComponent<Text>();
        GameObject kText = GameObject.Find("KinectText");
        kinectConnectedText = kText.GetComponent<Text>();
        GameObject oText = GameObject.Find("OculusText");
        oculusConnectedText = oText.GetComponent<Text>();
        GameObject ovrcanvas = GameObject.Find("UICanvas");
        startAnim = ovrcanvas.GetComponent<Animator>();
        score = 0;
        GameObject es = GameObject.Find("EventSystem");
        lookInput = es.GetComponent<LookInputModule>();


        //Disable Game over Button
        GameObject gameOverButton = GameObject.Find("RestartButton");
        Button b = gameOverButton.GetComponent<Button>();
        gameOverButton.SetActive(false);

        //Setup Player
        platformController = GameObject.Find("PlatformController");
        testSpawner = platformController.GetComponent<TestSpawner>();
        player = GameObject.Find("FPSPreFab");
        infinitePlayerController = player.GetComponent<InfinitePlayerController>();
        playerHealth = player.GetComponent<PlayerHealthController>();

        //Setup Kinect
        bodyManagerComponent = bodyManager.GetComponent<BodySourceManager>();
        handManagerComponent = handController.GetComponent<HandGestureTrigger>();

        //Setup Oculus
        GameObject ovrCameraRig = GameObject.Find("OVRCameraRig");
        oculusOVRManager = ovrCameraRig.GetComponent<OVRManager>();

        problemSolverObject = GameObject.Find("ProblemSolver");

    }