void Start() { _cameraTools = GameObject.Find("Camera").GetComponent("CameraTools") as CameraTools; tileHighlighter = Object.Instantiate(prefab, new Vector3(0,0,0), Quaternion.identity) as GameObject; tileHighlighter.gameObject.renderer.enabled = false; _gameState = Game.getInstance(); }
private void Start() { // Initialize variables rotation = transform.rotation; // Gather objects mainCamera = Camera.main; cameraTools = mainCamera.GetComponent <CameraTools>(); }
// Use this for initialization void Start() { //EventManager.instance.AddListener(this as IEventListener, "PlayerManagerModified"); mapInstance = Map.getInstance(); cameraTools = GameObject.Find("Camera").GetComponent("CameraTools") as CameraTools; initialized = false; bk1 = new BunkerLevel1(); os1 = new OilSpitterLevel1(); }
void Start() { _gameInstance = Game.getInstance(); _structureManager = GetComponentInChildren<StructureManager>(); _playerManager = PlayerManager.instance; _cameraTools = GameObject.Find("Camera").GetComponent("CameraTools") as CameraTools; _bk1 = new NailSpitterBase(); loadPlayerPrefs(); _gameInstance.GState = Game.GameState.Loading; }
public frmCamera(string filepath, string name) { this.EnableGlass = false; this.name = name; InitializeComponent(); camera = new CameraTools(); buttonX4.Enabled = false; foreach (DeviceInfo info in camera.GetCameras()) { comboBoxEx1.Items.Add(info); } camera.NewFrameEvent += new NewFrameEventHandler(camera_NewFrameEvent); }
private void ChangeDirections() { //finds the position of the object the script is attached to in viewport space var viewportPosition = CameraTools.GetViewportPosition(transform.position); //Debug.Log(viewportPosition); //when avatar hits edge of the screen, will make it change directions if (viewportPosition.x > m_screenRange.MAX && m_direction > 0) { m_direction = -1; SetSpeed(); } if (viewportPosition.x < m_screenRange.MIN && m_direction < 0) { m_direction = 1; SetSpeed(); } }
void Start() { _iState = InterfaceState.Load; _audio = GameObject.Find("Camera").GetComponent("AudioListener") as AudioListener; _camera = Camera.main; _cameraTools = GameObject.Find("Camera").GetComponent("CameraTools") as CameraTools; _game = Game.getInstance(); _map = Map.getInstance(); _player = PlayerManager.instance; }
// Use this for initialization void Start() { cameraTools = GameObject.Find("Camera").GetComponent("CameraTools") as CameraTools; tileHighlighter = Object.Instantiate(prefab) as GameObject; gameState = Game.getInstance(); }