示例#1
0
 private MainCamera Camera_SetUp()
 {
     camera = MainCamera.m_MainCamera;
     camera.SetTransfromControl(this);
     camera.SetCameraControl(this);
     camera.SetScreenCenter(new Vector2(0, 0));
     camera.SetDefaultDeadZone();
     return camera;
 }
示例#2
0
    private void OnEnable()
    {
        // Set Up Camera
        controller = MainCamera.m_MainCamera;
        controller.SetMoveControl(this);
        controller.SetTransfromControl(this);
        controller.SetCameraControl(this);
        controller.SetScreenCenter(new Vector2(Screen.width / 2, Screen.height / 2));
        controller.SetDefaultDeadZone();

        m_transform = this.GetComponent<Transform>();
        m_camera = this.GetComponentInChildren<Camera>();
    }