Skip to content

Instantly share code, notes, and snippets.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UserContoller : MonoBehaviour
{
private Vector3 vector;
public float speed = 0.5F;
// Start is called before the first frame update
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UserContoller : MonoBehaviour
{
private Vector3 vector;
public float speed = 0.5F;
// 버튼용
@doyle-flutter
doyle-flutter / talkUserCheckServer.js
Created February 16, 2021 09:09
단순한 구현을 위해 DB 대신 userTable.txt 파일을 생성하여 사용하였습니다
var express = require('express'),
app = express(),
http = require('http').Server(app),
// [email protected]
io = require('socket.io')(http),
fs = require('fs'),
cors = require('cors'),
path = require('path'),
userTablePath = `${path.join(__dirname, './userTable')}`;
// Android HTTP 설정
// - Manifest :
// (1) <uses-permission android:name="android.permission.INTERNET" />
// (2) <application
// android:label="exmaplee"
// android:icon="@mipmap/ic_launcher"
// android:usesCleartextTraffic="true">
// IOS HTTP 설정
// - Info.plist
@doyle-flutter
doyle-flutter / 20210217qnaServer.js
Last active February 17, 2021 09:06
유튜브 및 네이버 카페 이강원님 질문(https://cafe.naver.com/flutterjames)
// 일부 내용입니다
app.use(express.json());
app.get('/req', (req,res) =>{
res.send(`
<!DOCTYPE html>
<html>
<head>
<meta name='viewport'
@doyle-flutter
doyle-flutter / 20210217qnaFlutter.dart
Last active February 17, 2021 09:06
유튜브 및 네이버 카페 이강원님 질문(https://cafe.naver.com/flutterjames)
// webview_flutter: ^1.0.7 버전 사용
// http: ^0.12.2 버전 사용
class Req extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("웹뷰를 띄우겠습니다"),),
body: WebView(
initialUrl: 'http://127.0.0.1:3003/req',
@doyle-flutter
doyle-flutter / andIntentService.java
Last active February 18, 2021 06:37
#06 백그라운드
// ... import 생략
public class MyIntentService extends IntentService {
ResultReceiver receiver;
public MyIntentService() {
super("MyIntentService");
}
@Override
protected void onHandleIntent(Intent intent) {
@doyle-flutter
doyle-flutter / AndMainActivity.java
Last active February 18, 2021 06:42
#06 백그라운드
// ... import 생략
public class MainActivity3 extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main3);
ConstraintLayout c = (ConstraintLayout) findViewById(R.id.main3);
ResultReceiver mRecevier = new ResultReceiver(new Handler()){
@Override
@doyle-flutter
doyle-flutter / backFlutterMain.dart
Created February 18, 2021 08:57
#06 백그라운드 - 플러터
// ... import 생략
class IntentService extends StatefulWidget {
@override
_IntentServiceState createState() => _IntentServiceState();
}
class _IntentServiceState extends State<IntentService> {
String data;
MethodChannel dataChannel;
// ... import 생략
// 기존 카메라 내용과 합쳐있습니다
public class MainActivity extends FlutterActivity {
private static final String CHANNEL = "app.james.cam/cam";
private static final String SEND_CHANNEL = "app.james.cam/cam2";
MethodChannel sendChannel;
private static final String BACK_CHANNEL2 = "app.james.cam/intentservice";
private static final String BACK_METHOD_NAME = "intentservicestart";