示例#1
0
 private void Start()
 {
     menu          = GameObject.Find("Main Camera").GetComponent <GUIGame>();
     controlCamera = GameObject.Find("Main Camera").GetComponent <ControlCamera>();
     GUIOperations = GameObject.Find("spaceship").GetComponent <GUIOperations>();
     Skins         = GameObject.Find("spaceship").GetComponent <Skins>();
 }
示例#2
0
 /// Called upon initialization
 void Start()
 {
     networkManager     = networkManagerObject.GetComponent <CustomNetworkManager>();
     tpt                = networkManagerObject.GetComponent <TelepathyTransport>();
     mainCameraControls = mainCamera.GetComponent <ControlCamera>();
     mainCameraControls.DeTransition();
 }
示例#3
0
 void Start()
 {
     child         = GameObject.Find("huton_muki_tset").GetComponent <Transform>(); //プレイヤーオブジェクトを探し、transformコンポーネントを取得する
     ballRun       = child.GetComponent <BallRun>();                                //攻撃を受けたかどうかを制御するスクリプトを探し、DamageFlgを使用できるようにする
     cameraManeger = GameObject.Find("Main Camera").GetComponent <ControlCamera>(); //メインカメラのスクリプトを参照する
     damegeFlg     = false;
     obutonNum     = 0;
 }
        void uiCamera_ViewCameraEvent(object sender, int e)
        {
            ControlCamera uiCamera = new ControlCamera();

            uiCamera.Width   = 1366;
            uiCamera.Height  = 768;
            uiCamera.Postion = e;
            uiCamera.setLeft(0);
            uiCamera.setTop(0);
            uiCamera.CloseEvent += uiCamera_CloseEvent;
            this.UIMapContent.Children.Add(uiCamera);
        }
    void Awake()
    {
        footstepSoundLeft   = transform.Find("FootstepSoundLeft").GetComponent <SoundSource>();
        footstepSoundRight  = transform.Find("FootstepSoundRight").GetComponent <SoundSource>();
        animator            = GetComponent <Animator>();
        characterController = GetComponent <CharacterController>();
        characterController.Move(Vector3.zero);
        canvasSphere = GetComponentInChildren <CanvasSphere>();

        controlCameraLeft  = transform.Find("OVR_anchor/OVRCameraRig/TrackingSpace/LeftEyeAnchor").GetComponent <ControlCamera>();
        controlCameraRight = transform.Find("OVR_anchor/OVRCameraRig/TrackingSpace/RightEyeAnchor").GetComponent <ControlCamera>();
    }
    public Vector3 Raycast(Vector2 screenPoint)
    {
        if (ControlCamera == null)
        {
            return(Vector3.zero);
        }
        var   ray        = ControlCamera.ScreenPointToRay(screenPoint);
        Plane floorPlane = new Plane(Vector3.up, Vector3.zero);
        float distance   = 0;

        if (floorPlane.Raycast(ray, out distance))
        {
            return(ray.GetPoint(distance));
        }
        return(Vector3.zero);
    }
        void uiCamera_CloseEvent(object sender, EventArgs e)
        {
            ControlCamera uiCamera = sender as ControlCamera;

            this.UIMapContent.Children.Remove(uiCamera);
        }
示例#8
0
 void Awake()
 {
     Instance = this;
 }
示例#9
0
 private void Start()
 {
     staty         = GameObject.Find("spaceship").GetComponent <statystyki>();
     controlCamera = GameObject.Find("Main Camera").GetComponent <ControlCamera>();
     GUIOperations = GameObject.Find("spaceship").GetComponent <GUIOperations>();
 }