コード例 #1
0
ファイル: ControllerBoat.cs プロジェクト: yugich/SurfGame
    private void Awake()
    {
        instance = this;
        //get Suimono Specific Objects
        suimonoGameObject = GameObject.Find("SUIMONO_Module");
        if (suimonoGameObject != null) suimonoModuleObject = suimonoGameObject.GetComponent<SuimonoModule>();

        SetTarget(cameraTarget);

        //if (vehicleTarget != null){
        //	vehiclePosition = vehicleTarget.gameObject.Find("PlayerPositionMarker").transform;
        //	vehicleExitPosition = vehicleTarget.gameObject.Find("PlayerExitMarker").transform;
        //	vehicle_engine_object = vehicleTarget.gameObject.GetComponent(sui_demo_boatAnim) as sui_demo_boatAnim;
        //}

        MC = this.gameObject.GetComponent<PlayerControllerMaster>();
        IC = this.gameObject.GetComponent<PlayerInputController>();
    }
コード例 #2
0
ファイル: ControllerPlayer.cs プロジェクト: yugich/SurfGame
    private void Awake()
    {
        //get Suimono Specific Objects
        suimonoGameObject = GameObject.Find("SUIMONO_Module");
        if (suimonoGameObject != null) suimonoModuleObject = suimonoGameObject.GetComponent<SuimonoModule>();

        targetPosition = cameraTarget.position;
        targetRotation = cameraTarget.rotation;

        if (cameraTarget != null)
        {
            targetAnimator = cameraTarget.gameObject.GetComponent<PlayerAnimController>();
        }

        //if (vehicleTarget != null){
        //	vehiclePosition = vehicleTarget.gameObject.Find("PlayerPositionMarker").transform;
        //	vehicleExitPosition = vehicleTarget.gameObject.Find("PlayerExitMarker").transform;
        //	vehicle_engine_object = vehicleTarget.gameObject.GetComponent(sui_demo_boatAnim) as sui_demo_boatAnim;
        //}

        if (buoyancyTarget != null)
        {
            buoyancyObject = buoyancyTarget.GetComponent<fx_buoyancy>();
        }

        MC = this.gameObject.GetComponent<PlayerControllerMaster>();
        IC = this.gameObject.GetComponent<PlayerInputController>();
    }