void Awake() { this.table_board = new List <short>(); this.available_attack_cells = new List <short>(); this.graycell = Resources.Load("images/graycell") as Texture; this.focus_cell = Resources.Load("images/border") as Texture; this.blank_image = Resources.Load("images/blank") as Texture; this.game_board = Resources.Load("images/gameboard") as Texture; this.background = Resources.Load("images/gameboard_bg") as Texture; this.img_players = new List <Texture>(); this.img_players.Add(Resources.Load("images/red") as Texture); this.img_players.Add(Resources.Load("images/blue") as Texture); this.win_img = Resources.Load("images/win") as Texture; this.lose_img = Resources.Load("images/lose") as Texture; this.draw_img = Resources.Load("images/draw") as Texture; this.gray_transparent = Resources.Load("images/gray_transparent") as Texture; this.board = new List <short>(); this.network_manager = GameObject.Find("NetworkManager").GetComponent <CNetworkManager>(); this.game_state = GAME_STATE.READY; this.main_title = GameObject.Find("MainTitle").GetComponent <CMainTitle>(); this.score_images = gameObject.AddComponent <CImageNumber>(); this.win_player_index = byte.MaxValue; this.draw = this.on_gui_playing; this.battle_info = gameObject.AddComponent <CBattleInfoPanel>(); }
void Awake() { this.user_state = USER_STATE.NOT_CONNECTED; this.network_manager = GameObject.FindObjectOfType <CNetworkManager>(); this.user_state = USER_STATE.NOT_CONNECTED; transform.FindChild("button_start").GetComponent <Button>().onClick.AddListener(this.on_play); }
// Use this for initialization void Start() { this.user_state = USER_STATE.NOT_CONNECTED; this.bg = Resources.Load("images/title_blue") as Texture; this.battle_room = GameObject.Find("BattleRoom").GetComponent <CBattleRoom>(); this.battle_room.gameObject.SetActive(false); this.network_manager = GameObject.Find("NetworkManager").GetComponent <CNetworkManager>(); this.user_state = USER_STATE.NOT_CONNECTED; enter(); }
void Awake() { Inst = this; this.received_msg = ""; this.gameserver = gameObject.AddComponent <CFreeNetUnityService>(); this.gameserver.appcallback_on_status_changed += on_status_changed; this.gameserver.appcallback_on_message += on_message; connect(); }
private void Awake() { Debug.Log("CBattleRoom Awake"); if (instance == null) { instance = this; } else if (instance != null) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); this.gameMain = GameObject.Find("GameMain").GetComponent <GameMain>(); this.networkManager = GameObject.Find("NetworkManager").GetComponent <CNetworkManager>(); this.buildManager = GameObject.Find("BuildManager").GetComponent <BuildManager>(); }
private void Awake() { if (instance == null) { instance = this; } else if (instance != null) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); nowTurn = 0; commandsReceved = new CommandsQueue(); Application.targetFrameRate = 30; this.networkManager = GameObject.Find("NetworkManager").GetComponent <CNetworkManager>(); }
void Awake() { if (instance == null) { instance = this; } else if (instance != null) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); // 네트워크 통신을 위해 CFreeNetUnityService객체를 추가합니다. this.gameserver = gameObject.AddComponent <CFreeNetUnityService>(); // 상태 변화(접속, 끊김등)를 통보 받을 델리게이트 설정. this.gameserver.appcallback_on_status_changed += on_status_changed; // 패킷 수신 델리게이트 설정. this.gameserver.appcallback_on_message += on_message; }
private void Awake() { this.input_text = ""; this.received_texts = new List <string>(); this.network_manager = GameObject.Find("NetworkManager").GetComponent <CNetworkManager>(); }
void Awake() { if (_instance == null) { DontDestroyOnLoad(this.gameObject); _instance = this; } else if (_instance != this) { Destroy(this.gameObject); } }
void Awake() { if (_instance == null) { DontDestroyOnLoad(this.gameObject); _instance = this; } else if (_instance != this) { Destroy(this.gameObject); } if (!_networkInstance) _networkInstance = FindObjectOfType<CNetworkManager>(); if (loadOptions()) refreshQuality = true; else { Port = 25561; VSync = false; wWidth = Screen.width; wHeight = Screen.height; Volume = 1.0f; } saveOptions(); }
void OnEnable() { network_manager = gameObject.AddComponent <CNetworkManager>(); //network_manager.SaveServer = true; this.user_state = USER_STATE.NOT_CONNECTED; }
//Texture waiting_img; // public UnityEngine.UI.Text ResultCode; // public GameObject gResultCode; void OnEnable() { network_manager = gameObject.AddComponent <CNetworkManager>(); this.user_state = USER_STATE.NOT_CONNECTED; OnServerEnter(); }
void Awake() { this.network_manager = GameObject.Find("NetworkManager").GetComponent <CNetworkManager>(); this.game_state = GAME_STATE.READY; }
private void Awake() { this.network_manager = GameObject.Find("NetworkManager").GetComponent <CNetworkManager>(); }