Inheritance: MonoBehaviour
	void Start()
	{
		pContr = GameObject.FindWithTag("Player").GetComponent<PlayerController>();
		scrPC = GetComponent<PointingCamera>();
		scrMOI = GetComponent<MouseOrbitImproved>();
		mLook = GameObject.FindWithTag("Player").GetComponent<MouseLook>();
	}
Esempio n. 2
0
    void Start()
    {
        mouseLook = main_Camera.GetComponent("MouseLook") as MouseLook;
        animation.Stop();
        animation.wrapMode = WrapMode.Loop;

        animationComponent["Handgun_idle"].layer = 1;
        animationComponent["Handgun_idle"].speed = 0.25f;

        animationComponent["Handgun_idle_fire"].layer = 1;
        animationComponent["Handgun_idle_fire"].speed = 0.25f;

        animationComponent["Handgun_reload"].layer = 2;
        animationComponent["Handgun_reload"].speed = 1.5f;
        animationComponent["Handgun_reload"].weight = 1f;
        animationComponent["Handgun_reload"].wrapMode = WrapMode.Once;

        target = wrist_shoot.position;

        forearm_length = Vector3.Distance (elbow.position, wrist.position);
        upper_length = Vector3.Distance (shoulder.position, elbow.position);

        dist = Vector3.Magnitude(re_pos.position - shoulder.position);

        e_angle = Vector3.Angle(elbow.position - wrist.position, elbow.position-shoulder.position) - Mathf.Rad2Deg*Mathf.Acos(-(dist*dist - forearm_length*forearm_length - upper_length*upper_length)/(2f*forearm_length*upper_length));
        s_angle = Mathf.Rad2Deg*Mathf.Acos(-(forearm_length*forearm_length-upper_length*upper_length - dist*dist)/(2*upper_length*dist)) - Vector3.Angle (shoulder.position - elbow.position, shoulder.position - re_pos.position);
    }
Esempio n. 3
0
	// Use this for initialization
	void Start () {
		audioSource.clip = audio;
		mouse = player.GetComponent<MouseLook>();
		motor = player.GetComponent<CharacterMotor>();
		triggered = false;
		charControl = player.GetComponent<CharacterController>();
	}
    void Awake()
    {
        cameraScript = GetComponent<MouseLook>();
        cameraScript2 = camera.GetComponent<MouseLook>();
        controllerScript = GetComponent<CharacterMotor>();
        shotScript = GetComponent<Shot>();

         if (photonView.isMine)
        {
            this.camera.camera.enabled=true;
            cameraScript.enabled = true;
            cameraScript2.enabled = true;
            controllerScript.canControl = true;
            shotScript.enabled=true;
        }
        else
        {
            this.camera.camera.enabled=false;
            cameraScript.enabled = false;
            cameraScript2.enabled = false;
            controllerScript.canControl = false;
            shotScript.enabled=false;
        }

        gameObject.name = gameObject.name + photonView.viewID.ID;
    }
Esempio n. 5
0
 // Use this for initialization
 void Start()
 {
     //Get Script components
     mouseAim = GetComponent<MouseLook>();
     //On start screen the MouseLook script shouldn't be on
     mouseAim.enabled = false;
 }
Esempio n. 6
0
    // Use this for initialization
    void Start()
    {
        TargetCameraObject = FirstPersonCameraDock;
        FromCameraObject = TopDownCameraDock;

        CameraMouseLook = GetComponent<MouseLook>();
    }
Esempio n. 7
0
 void Awake()
 {
     fpsi=(FPSInputController)FindObjectOfType(typeof(FPSInputController));
     cc=(CharacterController)FindObjectOfType(typeof(CharacterController));
     ml=(MouseLook)FindObjectOfType(typeof(MouseLook));
     pc = (PlayerClicker)FindObjectOfType(typeof(PlayerClicker));
 }
Esempio n. 8
0
	void Start () 
	{
		mouseLook = GetComponent<MouseLook>();
		
		textureUI = new RenderTexture((int)Screen.width, (int)Screen.height, 24, RenderTextureFormat.ARGB32);
		textureUI.Create();
		cameraUI.targetTexture = textureUI;
		Shader.SetGlobalTexture("_UITexture", textureUI);

		textureNextPanorama = new RenderTexture((int)Screen.width, (int)Screen.height, 24, RenderTextureFormat.ARGB32);
		textureNextPanorama.Create();
		cameraNextPanorama.targetTexture = textureNextPanorama;
		Shader.SetGlobalTexture("_PanoramaNextTexture", textureNextPanorama);
		
		textureNone = new Texture2D(1, 1);
		textureNone.SetPixel(0, 0, new Color(1,0,0,0));
    textureNone.Apply();

		cursorRender = GetComponentInChildren<Renderer>();
		cursorRender.material.mainTexture = textureNone;

		Gate[] gateArray = GameObject.FindObjectsOfType<Gate>();
		List<Vector3> positionList = new List<Vector3>();
		for (int i = 0; i < gateArray.Length; ++i) {
			Gate gate = gateArray[i];
			if (gate.anotherGate != null && gate.transitionType == Gate.TransitionType.Fade) {
				positionList.Add(gate.transform.position);
			}
		}
		Vector3[] positionArray = positionList.ToArray();
		GameObject.FindObjectOfType<ParticleCloud>().SetPositionArray(positionArray);
	}
Esempio n. 9
0
	// Use this for initialization
	void Start () {
		drifter = GetComponent<FirstPersonDrifter>();
		mouseLook = GetComponent<MouseLook>();
		mouseLookVert = Camera.main.GetComponent<MouseLook>();
		arcBall = holdPosition.GetComponent<ArcBall>();
		currentTarget = holdPositionTarget;

	}
        public override void StateOnStart()
        {
            shipsText = GameObject.Find("Ships").GetComponent<TextMesh>();
            scoreText = GameObject.Find("Score").GetComponent<TextMesh>();
            myshieldMesh = GameObject.Find("ShieldPlayerT").GetComponent<MeshRenderer>();
            player = GameObject.Find("Player").GetComponent<MouseLook>();

            //			shipsAtScene
        }
Esempio n. 11
0
 // Use this for initialization
 void Start()
 {
     this.gameObject.layer = 2;
     startRot = new Vector3(xStartRotation, 0.0f, 0.0f);
     transform.rotation = Quaternion.Euler(startRot);
     ml = GameObject.Find("PlayerCamera").GetComponent<MouseLook>();
     rb = GetComponent<Rigidbody>();
     speed = speedOriginal;
 }
Esempio n. 12
0
    public void Start() {
		warpPosition = warpReset;
        controller = GetComponent<CharacterController>();
        playerHander = GetComponent<PlayerHandler>();
        mouseLook = GetComponent<MouseLook>();
        camera = GetComponentInChildren<Camera>();
        animator = GetComponent<Animator>();

        mouseLook.Init(transform, camera.transform);
    }
Esempio n. 13
0
    // Use this for initialization
    void Start()
    {
        characterMouseLook = GetComponent<MouseLook> ();
        mcamera = GameObject.Find("Main Camera").GetComponent<MouseLook> ();
        fpscontroller = GetComponent<FPSInputController> ();
        motion = GameObject.Find ("Arms").GetComponent<MotionScript> ();
        inventory = GameObject.Find ("Inventory").GetComponent<InventarScript> ();
        inventory.pausedTheGame (false);

        tutorial = GameObject.Find ("Tut").GetComponent<TutScript> ();
    }
Esempio n. 14
0
 void Awake()
 {
     // Variables to hold the scripts on other game objects so that we can manipulate them from this script
     mouse 		= pc.GetComponent <MouseLook> ();
     movement 	= pc.GetComponent <CharacterMotor> ();
     cam 		= Camera.main.GetComponent <MouseLook> ();
     talk 		= pc.GetComponent <playerScript> ();
     menu 		= holder.GetComponent <menuScript> ();
     inventory 	= holder.GetComponent <cameraScript> ();
     message 	= text.GetComponent <uiSystem> ();
 }
Esempio n. 15
0
    // Use this for initialization
    private void Start()
    {
        crosshairRift = GameObject.FindGameObjectWithTag("CrosshairRift").GetComponent<MeshRenderer>();
        //crosshairVive = GameObject.FindGameObjectWithTag("CrosshairVive").GetComponent<MeshRenderer>();

        gazeEye = GameObject.Find("[CameraRig]/Camera (head)/Camera (eye)").GetComponent<TestRaycast>();
        mouseLook = GameObject.Find("[CameraRig]/Camera (head)").GetComponent<MouseLook>();

        playerRig = GameObject.Find("[CameraRig]");
        var vrSpace = GameObject.Find("[SteamVR]").transform.position;
    }
Esempio n. 16
0
	public void Initialize()
	{
		foreach (GameObject g in GameObject.FindGameObjectsWithTag("Player")) {
			if (g.GetComponent<MouseController>() != null) {
				mouseController = g.GetComponent<MouseController>();
				mouseLook1 = g.GetComponent<MouseLook>();
			}
		}
		mouseLook2 = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<MouseLook>();
		//tempCrossHairTexture = mouseController.crosshairTexture;
		interactLabel = mouseController.interactLabel;
	}
Esempio n. 17
0
	void Start () 
	{
		currentWorld = spawnWorld;
		this.transform.position = currentWorld.transform.position;
		rayDirection = new Vector3(Input.mousePosition.x, Input.mousePosition.y);

		ui = GetComponent<Interface>();
		fx = GameObject.FindObjectOfType<FX>();
		
		transition = GameObject.FindObjectOfType<Transition>();
		mouseLook = GameObject.FindObjectOfType<MouseLook>();
	}
Esempio n. 18
0
    // Use this for initialization
    void Start()
    {
        mouseScript1 = player1.transform.gameObject.GetComponent<MouseLook>();
        mouseCameraScript1 = camera1.transform.gameObject.GetComponent<MouseLook>();
        moveScript1 = player1.transform.gameObject.GetComponent<FPSInputController>();

        mouseScript2 = player2.transform.gameObject.GetComponent<MouseLook>();
        mouseCameraScript2 = camera2.transform.gameObject.GetComponent<MouseLook>();
        moveScript2 = player2.transform.gameObject.GetComponent<FPSInputController>();

        pauseMenu.SetActive(false);
        paused = false;
    }
    // Use this for initialization
    void Awake()
    {
        movementScript = gameObject.GetComponent<CharacterMotor>();
        mouseScript = gameObject.GetComponent<MouseLook>();
        fpsScript = gameObject.GetComponent<FPSInputController>();

        // Find the level manager object and script
        GameObject goLevelManager = GameObject.Find("Level Manager");

        if(goLevelManager) {

            levelManagerScript = goLevelManager.GetComponent<LevelManager>();
        }
    }
Esempio n. 20
0
	void Start () 
	{
		player = GameObject.FindObjectOfType<Player>();
		mouseLook = GameObject.FindObjectOfType<MouseLook>();
		ui = GameObject.FindObjectOfType<Interface>();
		audioListener = GameObject.FindObjectOfType<AudioListener>().transform;
		filterPlanet = GameObject.FindObjectOfType<FilterPlanet>();

		Shader.SetGlobalFloat("_InterpolationRatio", 0f);
		Shader.SetGlobalFloat("_IsSphereTransition", 0f);
		Shader.SetGlobalVector("_HoleDirection", Vector3.up);

		audioListener.position = player.transform.position;
	}
Esempio n. 21
0
    // Use this for initialization
    void Start()
    {
        mouseLook = Camera.mainCamera.GetComponent<MouseLook>();
        mouseFollow = Camera.mainCamera.GetComponent<SmoothFollowCS>();
        //set camera
        mouseFollow.enabled = false;
        mouseFollow.target = gameObject.transform;
        mouseFollow.targetLocation = gameObject.transform.position;
        sender = GetComponent<NetworkLaunchMessageSender>();

        //GUI initializers
        owners = new List<int>();
        myGUI = this.GetComponent<PlayerGUI>();
        guiText = (GUIText)GameObject.Find("GUI Text").GetComponent<GUIText>();
    }
Esempio n. 22
0
    // Use this for initialization
    void Start()
    {
        mouseScript1 = player1.transform.gameObject.GetComponent<MouseLook>();
        mouseCameraScript1 = camera1.transform.gameObject.GetComponent<MouseLook>();
        moveScript1 = player1.transform.gameObject.GetComponent<FPSInputController>();

        mouseScript2 = player2.transform.gameObject.GetComponent<MouseLook>();
        mouseCameraScript2 = camera2.transform.gameObject.GetComponent<MouseLook>();
        moveScript2 = player2.transform.gameObject.GetComponent<FPSInputController>();

        redScore = 0; blueScore = 0;
        winnerDeclared = false;
        scoreLimit = 100;
        gameOverCamera.SetActive(false);
        gameOver.SetActive(false); winnerPanel.SetActive(false);
    }
Esempio n. 23
0
	void Start () 
	{
		currentWorld = spawnWorld;
		this.transform.position = currentWorld.transform.position;
		rayDirection = new Vector3(0.5f, 0.5f, 1f);

		ui = GetComponent<Interface>();
		fx = GameObject.FindObjectOfType<FX>();
		voice = GameObject.FindObjectOfType<Voice>();
		
		transition = GameObject.FindObjectOfType<Transition>();
		mouseLook = GameObject.FindObjectOfType<MouseLook>();
		audioListener = GameObject.FindObjectOfType<AudioListener>().transform;

		StartCoroutine(transition.Intro(gateSpawn));
	}
Esempio n. 24
0
    public void AssignData()
    {
        if (GameObject.FindGameObjectWithTag("Player") != null)
        {
            look = GameObject.FindGameObjectWithTag("Player").GetComponent<MouseLook>();
            look.sensitivityX = mouseXSensitivity;
            look.sensitivityY = mouseYSensitivity;

            MouseLook look2 = GameObject.FindGameObjectWithTag("Player").transform.FindChild("Main Camera").GetComponent<Camera>().GetComponent<MouseLook>();

            look2.sensitivityX = mouseXSensitivity;
            look2.sensitivityY = mouseYSensitivity;

            GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerStats>().difficulty = difficulty;
            runner = GameObject.FindGameObjectWithTag("Player").GetComponent<Cryomancer>();
            runner.changeMaxIce(playerMaxIce);
        }
    }
    void Awake()
    {
        cameraScript2 = this.GetComponent<MouseLook>();
        shotScript = this.GetComponent<Shot>();

         if (photonView.isMine)
        {
            //MINE: local player, simply enable the local scripts
            cameraScript2.enabled = true;
            shotScript.enabled = true;
        }
        else
        {
            cameraScript2.enabled = false;
            shotScript.enabled = false;
        }

        gameObject.name = gameObject.name + photonView.viewID.ID;
    }
Esempio n. 26
0
    //private pictureScript	pic;
    void Awake()
    {
        // Variables to hold the scripts on other game objects so that we can manipulate them from this script
        mouse 		= pc.GetComponent <MouseLook> ();
        //movement 	= pc.GetComponent <CharacterMotor> ();
        cam 		= Camera.main.GetComponent <MouseLook> ();
        inventory 	= this.GetComponent <cameraScript> ();
        message 	= text.GetComponent <uiSystem> ();
        cursor		= gui.GetComponent <guiSystem> ();
        //pic 		= picture.GetComponent <pictureScript> ();

        if (Application.loadedLevel == 3)
        {
            talk 	= SH.GetComponent <playerScript> ();
        }

        else
        {
            talk 	= pc.GetComponent <playerScript> ();
        }
    }
	private void Start()
	{
		QualitySettings.shadowDistance = 100;

		Weapon = GameObject.Find("weapon");

		isShow = false;

		// Get runtime builder main class
		runtimeBuilder = (uteRuntimeBuilder) this.gameObject.GetComponent<uteRuntimeBuilder>();

		// Set Raycast distance (to not let build far away)
		runtimeBuilder.SetRaycastDistance(3.0f);

		// Set snapping to be fixed 1.0f
		runtimeBuilder.SetSnapOption("fixed");

		// Set fixed raycast position from Screen point (form center of the screen)
		runtimeBuilder.SetFixedRaycastPosition(new Vector2(Screen.width/2,Screen.height/2));

		// Get mcraft Category
		mCraftCategory = runtimeBuilder.GetCategoryByCategoryName("mcraft");

		// Get mouseLook component to disable or enable looking if UI shown
		if(!GameObject.Find("iOSControls"))
		{
			isiOSExample = false;
			mouseLookX = GameObject.Find("First Person Controller").GetComponent<MouseLook>();
			mouseLookY = GameObject.Find("First Person Controller/Main Camera").GetComponent<MouseLook>();
		}
		else
		{
			isiOSExample = true;

			// Disale shadows for iOS
			GameObject.Find("Directional light").GetComponent<Light>().shadows = LightShadows.None;
		}

		StartCoroutine(GenerateMapProcedurally());
	}
Esempio n. 28
0
	// Used for initialization
	void Start () {
        _gameStateInstance = this;
        players = new List<Team>();
        players.Add(new Team(bocceBallPrefabTeam1, "BLUE TEAM", blueTeamBanner));
        players.Add(new Team(bocceBallPrefabTeam2, "RED TEAM", redTeamBanner));
        currentTeam = players[0];

        ballSet = new List<GameObject>();


        GameObject.Instantiate(playerPrefab);
        // now that the player is created, store a reference to its MouseLook component
        mouseLook = (MouseLook)FindObjectOfType(typeof(MouseLook));
        GameObject.Instantiate(guiPrefab);

        mouseLook.toggleMouseLock();
        menuFunction = resetGame;
        gameMenuMessage = "Play Next Round";
        gameState = State.Menu;


	}
Esempio n. 29
0
	// Use this for initialization
	void Start ()
	{
		//set button dimensions
		SetButtonDimensions();
		// just making this shit up
		fontSize = (int)(Screen.width / 24.4f);
	
		pauseMenuStyle.fontSize = fontSize;
	
		fovSlider = Camera.main.fieldOfView;
		
		camMouseLook = Camera.main.GetComponent<MouseLook>();
		capsuleMouseLook = GameObject.FindWithTag("Player").GetComponent<MouseLook>();
		sensitivitySlider = capsuleMouseLook.sensitivityX;
		
		// save the default values
		defaultFOV = fovSlider;
		defaultSensitivity = sensitivitySlider;
		
		RememberInvertY();
		RememberFOV();
		RememberSensitivity();
	}
Esempio n. 30
0
    // Use this for initialization
    void Awake()
    {
        if (!Effects && GetComponent<Effects> ())
            Effects = GetComponent<Effects> ();
        else if (!Effects)
            Effects = (Effects) gameObject.AddComponent<Effects> ();
        EnemyGC2 = enemyGC2;
        DontDestroyOnLoad (gameObject);
        PlayerManager.Players.Add (this);
        Walk = GetComponent<Walk> ();
        Punch = GetComponent<Punch> ();
        Health = GetComponent<Health> ();
        Mana = GetComponent<Mana> ();
        TurnBody = TB;
        TurnHead = TH;
        EnemyLOS = enemyLOS;
        SpawnLOS = spawnLOS;

        walk = Walk;
        health = Health;
        punch = Punch;
        mana = Mana;
    }
Esempio n. 31
0
 private void Start()
 {
     mouseLook = gameObject.GetComponent<FirstPersonController>().m_MouseLook; //Reemplazar por el objeto de camara
     questTrack = GetComponent<QuestTracker>();
     questTrackerPanel.gameObject.SetActive(false);
 }
Esempio n. 32
0
 void Start()
 {
     movementController = GetComponent <CharacterController>();
     mouseLook          = GetComponent <MouseLook>();
 }
Esempio n. 33
0
    public static void DoAction(ActionWithObject action)
    {
        Stopwatch SW = new Stopwatch();

        SW.Start();

        MouseLook scriptMouseLook = GameObject.Find("Player").GetComponent <MouseLook>();
        Zoom      scriptZoom      = GameObject.Find("Player").GetComponent <Zoom>();

        scriptMouseLook.enabled = true;
        scriptZoom.enabled      = true;
        //Cursor.visible = false;
        //Cursor.lockState = CursorLockMode.Locked;

        GameObject     gameObjectUnityApi = GameObject.Find("UnityAPI");
        UnityApiScript unityApiScript     = gameObjectUnityApi.GetComponent <UnityApiScript>();

        var     gameObject = GameObject.Find("UnityAPI");
        Logging log        = gameObject.GetComponent <Logging>();

        switch (action.typeEvent)
        {
        case "Rotate":
            var jsonParametersRotateGameObject = new JsonParametersRotateGameObject
            {
                ObjectName = action.objectName,
                Angle      = JsonUtility.FromJson <Vector3>(action.parameter),
                IsSpecific = true,
                IsLocal    = true
            };

            string json = JsonUtility.ToJson(jsonParametersRotateGameObject);
            unityApiScript.RotateGameObject(json);

            SW.Stop();

            break;

        case "ChangeShader":
            var jsonParametersShaderGameObject = new JsonParametersShaderGameObject
            {
                ObjectName = action.objectName,
                shaderName = action.parameter
            };

            string json1 = JsonUtility.ToJson(jsonParametersShaderGameObject);
            unityApiScript.ChangeShader(json1);

            SW.Stop();

            break;

        case "ChangePositionObject":
            var param = JsonUtility.FromJson <Vector3>(action.parameter);
            var jsonParametersPositionGameObject = new JsonParametersPositionGameObject
            {
                ObjectName = action.objectName,
                Position   = param,
                SetNew     = true
            };

            string json2 = JsonUtility.ToJson(jsonParametersPositionGameObject);
            unityApiScript.ChangePositionObject(json2);

            SW.Stop();

            break;

        case "HideObject":
            var jsonParametersHideGameObject = new BaseJsonParametrs
            {
                ObjectName = action.objectName
            };

            string json3 = JsonUtility.ToJson(jsonParametersHideGameObject);

            unityApiScript.HighGameObject(json3);

            SW.Stop();

            break;

        case "UnHideObject":
            var jsonParametersUnHideGameObject = new BaseJsonParametrs
            {
                ObjectName = action.objectName
            };

            string json4 = JsonUtility.ToJson(jsonParametersUnHideGameObject);

            unityApiScript.UnHighGameObject(json4);

            SW.Stop();

            break;

        case "UseTable":
            //var param1 = JsonUtility.FromJson<Vector3[]>(action.parameter);
            //var jsonParametersUseGameObject = new JsonParametersUseTableGameObject
            //{
            //    Angle = param1[1],
            //    Position = param1[0]
            //};

            //string json4 = JsonUtility.ToJson(jsonParametersUseGameObject);

            //unityApiScript.RotateGameObject(json4);
            //GameObject.Find(action.parameter).transform.eulerAngles
            var          targetGO     = GameObject.Find(action.parameter);
            TablesScript tablesScript = targetGO.GetComponent <TablesScript>();

            if (GameObject.Find(action.objectName + action.parameter) != null)
            {
                break;
            }
            GameObject newTable = Instantiate(GameObject.Find(action.objectName));
            newTable.name             = action.objectName + " " + action.parameter;
            newTable.transform.parent = targetGO.transform;
            // BoxCollider box = newTable.AddComponent<BoxCollider>();
            OnChose onChose = newTable.transform.GetChild(0).GetChild(0).GetComponent <OnChose>();
            if (onChose)
            {
                onChose.enabled = false;
            }

            var boxCollider = newTable.transform.GetChild(0).GetChild(0).transform.GetComponent <BoxCollider>();
            //boxCollider.enabled = false;

            //newTable.transform.eulerAngles = new Vector3(-90f, -90f, 270f);
            //newTable.transform.eulerAngles = new Vector3(-0,3641f, 0,2124f, 0,102f);

            var jsonParametersRotateGameObject1 = new JsonParametersRotateGameObject
            {
                ObjectName = newTable.name,              //action.objectName,
                Angle      = tablesScript.localRotation, //new Vector3(-180f, -1.525879e-05f, -1.525879e-05f),//GameObject.Find(action.parameter).transform.eulerAngles
                IsSpecific = true,
                IsLocal    = true
            };

            string json5 = JsonUtility.ToJson(jsonParametersRotateGameObject1);
            unityApiScript.RotateGameObject(json5);

            var jsonParametersPositionGameObject1 = new JsonParametersPositionGameObject
            {
                ObjectName = newTable.name,              //action.objectName,
                Position   = tablesScript.localPosition, //new Vector3(-0.121457f, 1.350971f, 3.714326f),//GameObject.Find(action.parameter).transform.position
                SetNew     = true
            };



            string json6 = JsonUtility.ToJson(jsonParametersPositionGameObject1);
            unityApiScript.ChangePositionObject(json6);

            InitSceneScript scriptSetActive = GameObject.Find("Player").GetComponent <InitSceneScript>();
            EProject        eProject        = scriptSetActive.eProject;

            eProject.InventoryItemCurrent = null;
            if (eProject.GameObjectInventoryItemCurrent)
            {
                GameObject.Destroy(eProject.GameObjectInventoryItemCurrent);
            }

            //InitSceneScript scriptSetActive = GameObject.Find("Player").GetComponent<InitSceneScript>();
            //EProject eProject = scriptSetActive.eProject;
            //eProject.InventoryItemCurrent = null;

            SW.Stop();

            break;

        case "DestroyObject":
            var jsonParametersDestroyGameObject = new BaseJsonParametrs
            {
                ObjectName = action.objectName
            };

            string json7 = JsonUtility.ToJson(jsonParametersDestroyGameObject);

            unityApiScript.DestroyGameObject(json7);

            SW.Stop();

            break;

        case "Check":


            UnityEngine.Debug.Log("ПРОВЕРКА");

            break;
        }

        InitSceneScript initSceneScript = GameObject.Find("Player").GetComponent <InitSceneScript>();

        initSceneScript._eventListener.SendMessageToSR(action.ElementRef, action.ActionRef, action.InventoryItemRef);

        log.logs.Add(new LogElement
        {
            dataTime      = DateTime.Now,
            name          = action.logName,
            objName       = action.objectName,
            timeExecution = SW.ElapsedMilliseconds.ToString()
        });

        showAction = false;

        //Cursor.visible = true;
        //Cursor.lockState = CursorLockMode.None;
    }
Esempio n. 34
0
 void Awake()
 {
     Instance = this;
 }
Esempio n. 35
0
 private void Start()
 {
     playerMovement = player.GetComponent <PlayerMovement>();
     mouseLook      = Camera.main.GetComponent <MouseLook>();
 }
Esempio n. 36
0
 void Start()
 {
     _mouseLook      = GetComponentInChildren <MouseLook>();
     _controllerMove = GetComponent <ControllerMove>();
 }
 // Use this for initialization
 void Start()
 {
     player  = GameObject.FindGameObjectWithTag("Player");
     mainCam = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <MouseLook>();
 }