Esempio n. 1
0
    public void ProcessLoad(SoundPlayData Data)
    {
        /// 이미 로드 중인 데이터 클립 제거 추가
        ///
        /// 이미 로드중인 클립이 있는가? => 플레이 리스트에 추가
        ///

        /*
         * for (int i = 0; i < Loaders.size; i++)
         * {
         *  if (Loaders[i].m_strName == Data.m_strSoundFileName)
         *  {
         *     Loaders[i].AddPlayData(Data);
         *      return;
         *  }
         * }
         */
        AudioClip TargetClip = Resources.Load <AudioClip>(string.Concat(m_strLocalLoad, Data.m_strSoundFileName));

        if (TargetClip == null)
        {
            Debugs.LogError("[사운드로드] ProcessLoad 실패! 대상 클립(", Data.m_strSoundFileName, ")을 찾을 수 없습니다!");
        }
        else
        {
            m_Storage.AddAudioClip(TargetClip);
            Data.m_AudioClipGroup.PushAudioClip(TargetClip);
            Data.LoadComplete(TargetClip, 0.0f);
            Debugs.Log(string.Concat("[사운드로드] 완료! ", Data.m_LoadedAudioClip.name, " 소요 시간 [", 0.0f, "]"));
            Data.TryPlay();
        }
        return;
    }
    public override void InitData()
    {
        if (BOL_Main_Controller.instance.ChairPosition == Constant.CHAIR_PLAYER || BOL_Main_Controller.instance.ChairPosition == Constant.CHAIR_VIEWER)
        {
            SetActivePanel(false);
        }
        else
        {
            SetActivePanel(true, skillpostion, spellposition);
        }

        canvasShowHero.worldCamera = BOL_Manager.instance.mainCamera.mainCamera;
        _listAction = new List <Action>();
        //OnPressInScene();
        //StartCoroutine(DelayPlaySkillFirstData());


        //DelaySkillWhenPress(timedelayAttack_Q, textAttackQ, _buttonQ, imgDelayQ);
        //DelaySkillWhenPress(timedelayAttack_W, textAttackW, _buttonW, imgDelayW);
        //DelaySkillWhenPress(timedelayAttack_E, textAttackE, _buttonE, imgDelayE);
        //DelaySkillWhenPress(timedelayAttack_Spell, textAttackSpell, _buttonSpell, imgDelaySpell);
        BOL_Manager.instance.StartControlMatrix();
        BOL_Manager.instance.StartCurrentMatrix();
#if TEST
        Debug.Log(Debugs.ColorString("start delay spell", Color.red));
#endif
        if (enumeratorQ != null)
        {
            StopCoroutine(enumeratorQ);
            enumeratorQ = null;
        }
        if (enumeratorW != null)
        {
            StopCoroutine(enumeratorW);
            enumeratorW = null;
        }
        if (enumeratorE != null)
        {
            StopCoroutine(enumeratorE);
            enumeratorE = null;
        }
        if (enumeratorSpell != null)
        {
            StopCoroutine(enumeratorSpell);
            enumeratorSpell = null;
        }
        enumeratorE     = btnSkillE.DelaySkill();
        enumeratorW     = btnSkillW.DelaySkill();
        enumeratorQ     = btnSkillQ.DelaySkill();
        enumeratorSpell = btnSkillSpell.DelaySkill();
        StartCoroutine(enumeratorQ);
        StartCoroutine(enumeratorW);
        StartCoroutine(enumeratorE);
        StartCoroutine(enumeratorSpell);
        OnclickButton();
        Hide();
        StartDelaySkill();
        leftPositionEffect  = _Hero_left_ControlSkill.ParentBody.transform.position;
        rightPositionEffect = _Hero_right_ControlSkill.ParentBody.transform.position;
    }
Esempio n. 3
0
    void Start()
    {
#if TEST
        Debugs.LogRed(">>> vào scene");
#endif

        if (NetworkGlobal.instance != null && NetworkGlobal.instance.instanceRealTime != null)
        {
            NetworkGlobal.instance.instanceRealTime.onDisconnect = () =>
            {
                LoadingCanvasController.instance.Hide();
                PopupManager.Instance.CreatePopupMessage(MyLocalize.GetString(MyLocalize.kError)
                                                         , MyLocalize.GetString(MyLocalize.kConnectionError)
                                                         , string.Empty
                                                         , MyLocalize.GetString(MyLocalize.kOk)
                                                         , () =>
                {
                    Debug.LogError("xử lý chuyển scene khi mất kết nối");
                    CoreGameManager.instance.SetUpOutRoomAndBackToChooseTableScreen();
                });
            };
            DataManager.instance.userData.sessionId = NetworkGlobal.instance.instanceRealTime.sessionId;
        }
        StartCoroutine(DoActionRun());
        //StartControlMatrix();
        //StartCurrentMatrix();
    }
Esempio n. 4
0
    public void SetDataTableInfo(MessageReceiving message)
    {
        InitListOtherUserDataInGame(message);
        bet = message.readLong();
        BOL_Manager.instance.betDefault        = bet;
        BolNetworkReceiving.instance.betSetup  = bet;
        BOL_ChoiceHero.instance.betInGame.text = bet.ToString();
        long betProcess = message.readLong();

        mapid     = message.readShort();
        TIME_PLAY = message.readLong();
        status    = message.readByte();
        Debugs.LogRed("bet " + bet + "betProcess" + betProcess + " |mapid|" + mapid + "  |Time_play|" + TIME_PLAY + " |status|" + status);
        if (status == 0)
        {
            BOL_Main_Controller.instance.ChairPosition = Constant.CHAIR_PLAYER;
            ReceiveWaitingGame(message);
        }
        else
        {
            BOL_Main_Controller.instance.ChairPosition = Constant.CHAIR_VIEWER;
            ReceivePlayingGame(message);
        }
        hasLoadTableInfo = true;
    }
Esempio n. 5
0
        public void TestStart()
        {
            try
            {
                LightObject lightObject = new LightObject();

                LightObject dummy = new LightObject();
                dummy.PutInt(1, 1000);
                dummy.PutInt(2, 10);

                LightObject dummy2 = new LightObject();
                dummy2.PutInt(1, 1000);
                dummy2.PutInt(2, 10);

                dummy.PutObject(1, dummy2);

                lightObject.PutObject(2, dummy);
                lightObject.PutObject(3, dummy2);

                byte[] data = lightObject.Serialize();

                LightObject coveredObject = LightObject.Deserialize(data);

                coveredObject.GetInt(1);

                Debugs.Log(coveredObject);
            }
            catch (Exception e)
            {
                Debugs.Log(e);
            }
        }
Esempio n. 6
0
    public void ShowFinish()
    {
        Debugs.LogBlue(" finish game");
        for (int i = 0; i < 3; i++)
        {
            currentPiece.transform.GetChild(i).GetComponent <SpriteRenderer>().sprite = null;
        }
        StopMoveVertical();

        countNextPiece = 0;
        countPiece     = 0;
        for (int i = 0; i < 12; i++)
        {
            for (int j = 0; j < 8; j++)
            {
                matrix[i, j]          = 0;
                listObjectBreak[i, j] = null;
                LeanPool.Despawn(matrixGameOject[i, j]);
                matrixGameOject[i, j] = null;
            }
        }
        BOL_Battle_Screen.instance.SelfDestruction();
        BOL_MainControl_Offline.instance.Back2LastScene();
        //StartCoroutine(CountDownStart());
    }
Esempio n. 7
0
    void Start()
    {
        debuggerScript = GameObject.Find("DebugOptions").GetComponent <Debugs>();


        //sideGunTurret = sideGunMount00.transform.Find("SideGuns/SideGunMount01/SideTurret(Clone)/Barrels").gameObject;
        turretScripts = new TurretScript[] {
            transform.Find("SideGuns/SideGunMount00/SideTurret(Clone)").GetComponent <TurretScript>(),
            transform.Find("SideGuns/SideGunMount01/SideTurret(Clone)").GetComponent <TurretScript>(),
            transform.Find("SideGuns/SideGunMount02/SideTurret(Clone)").GetComponent <TurretScript>(),
            transform.Find("SideGuns/SideGunMount03/SideTurret(Clone)").GetComponent <TurretScript>(),
            transform.Find("SideGuns/SideGunMount04/SideTurret(Clone)").GetComponent <TurretScript>(),
            transform.Find("SideGuns/SideGunMount05/SideTurret(Clone)").GetComponent <TurretScript>()
        };

        sideGunMount00  = transform.Find("SideGuns/SideGunMount00");
        sideGunMount01  = transform.Find("SideGuns/SideGunMount01");
        sideGunMount02  = transform.Find("SideGuns/SideGunMount02");
        sideGunMount03  = transform.Find("SideGuns/SideGunMount03");
        sideGunMount04  = transform.Find("SideGuns/SideGunMount04");
        sideGunMount05  = transform.Find("SideGuns/SideGunMount05");
        frontGunMount00 = transform.Find("FrontGuns/FrontGunMount00");
        layerMask       = LayerMask.GetMask("Ships");
        InvokeRepeating("do_raycasts", 0.0f, 2.0f);
    }
Esempio n. 8
0
 /// <summary>
 /// Fixed:
 /// </summary>
 private void SetProperties(Context context)
 {
     SysLogType  = SysLogTypes.Info;
     OnAzure     = Environments.RdsProvider == "Azure";
     MachineName = Environments.MachineName;
     ServiceName = Environments.ServiceName;
     Application = Environments.Application;
     if (context.Url != null)
     {
         RequestData                = ProcessedRequestData(context: context);
         HttpMethod                 = context.HttpMethod;
         ApplicationAge             = Applications.ApplicationAge();
         ApplicationRequestInterval = Applications.ApplicationRequestInterval();
         SessionAge                 = context.SessionAge();
         SessionRequestInterval     = context.SessionRequestInterval();
         RequestSize                = RequestData.Length;
         Url             = context.Url;
         UrlReferer      = context.UrlReferrer;
         UserHostName    = context.UserHostName;
         UserHostAddress = context.UserHostAddress;
         UserLanguage    = context.Language;
         UserAgent       = context.UserAgent;
         SessionGuid     = context.SessionGuid;
     }
     InDebug         = Debugs.InDebug();
     AssemblyVersion = Environments.AssemblyVersion;
 }
        /// <summary>
        /// TimerJob을 Global Dispatch Timer에 등록합니다.
        /// GameObject인 bindTarget이 파괴되면 작업도 취소됩니다.
        /// 이 메서드는 동작 시간의 유효성을 따로 검사해주지 않습니다.
        /// </summary>
        /// <param name="job">실행할 TimerJob 객체</param>
        /// <param name="bindTarget">라이프 사이클을 함께할 GameObject</param>
        public void PushTimerJob(TimerJob job, GameObject bindTarget)
        {
            if (job == null)
            {
                Debugs.LogError("Job이 null입니다.");
                return;
            }

            if (bindTarget == null)
            {
                Debugs.LogError("bindTarget이 null입니다.");
                return;
            }

            var destroyTrigger = bindTarget.GetComponent <DestroyTrigger>();

            if (destroyTrigger == null)
            {
                                #if __USE_TIMER_LOG
                Debugs.Log("Create New DestroyTrigger");
                                #endif
                destroyTrigger = bindTarget.AddComponent <DestroyTrigger>();
            }

                        #if __USE_TIMER_LOG
            Debugs.Log("Attatch DestroyTrigger to gameObject");
                        #endif

            if (RegisterTrigger(destroyTrigger, bindTarget, job))
            {
                timedJobQueue.Enqueue(job);
            }
        }
        private bool RegisterTrigger(DestroyTrigger trigger, GameObject bindTarget, TimerJob timerJob)
        {
            if (bindTarget == null)
            {
                Debugs.LogError("bindTarget이 이미 null입니다.");
                return(false);
            }

            if (timerJob == null)
            {
                Debugs.LogError("timerJob이 이미 null입니다.");
                return(false);
            }

            if (triggerMap.ContainsKey(trigger.Key))
            {
                triggerMap[trigger.Key].Add(new WeakReference(timerJob));
            }
            else
            {
                triggerList.AddLast(trigger);
                triggerMap.SafetyAdd(trigger.Key, new List <WeakReference>());
                triggerMap[trigger.Key].Add(new WeakReference(timerJob));
            }

            return(true);
        }
Esempio n. 11
0
        private void _DeleteElement(IHEMeshNode element, IList list)
        {
            if (element.IsDeleted)
            {
                return;
            }
            var id = element.ID;

            Debugs.CheckRange(id, 0, list.Count);
            var v = list[id];

            if (v != element)
            {
                throw new InvalidOperationException("The element is not belong to this mesh!");
            }
            var lastID = list.Count - 1;

            if (id != lastID)
            {
                var last = list[lastID] as IHEMeshNode;
                last.ID  = id;
                list[id] = last;
            }
            list.RemoveAt(lastID);
            element.Dispose();
        }
Esempio n. 12
0
        /// <summary>
        /// Fixed:
        /// </summary>
        private void SetProperties()
        {
            SysLogType  = SysLogModel.SysLogTypes.Info;
            OnAzure     = Environments.RdsProvider == "Azure";
            MachineName = Environments.MachineName;
            ServiceName = Environments.ServiceName;
            Application = Environments.Application;
            var request = new Request(System.Web.HttpContext.Current);

            if (request.HttpRequest != null)
            {
                RequestData                = request.ProcessedRequestData();
                HttpMethod                 = request.HttpMethod();
                ApplicationAge             = Applications.ApplicationAge();
                ApplicationRequestInterval = Applications.ApplicationRequestInterval();
                SessionAge                 = Sessions.SessionAge();
                SessionRequestInterval     = Sessions.SessionRequestInterval();
                RequestSize                = RequestData.Length;
                Url             = request.Url();
                UrlReferer      = request.UrlReferrer();
                UserHostName    = request.UserHostName();
                UserHostAddress = request.UserHostAddress();
                UserLanguage    = request.UserLanguage();
                UserAgent       = request.UserAgent();
                SessionGuid     = Sessions.SessionGuid();
            }
            InDebug         = Debugs.InDebug();
            AssemblyVersion = Environments.AssemblyVersion;
        }
Esempio n. 13
0
    IEnumerator AddProcesAction(Action action, string nameAction = "")
    {
#if TEST
        Debug.Log(nameAction + Debugs.ColorString("   is running", Color.red));
#endif
        action();
        yield break;
    }
Esempio n. 14
0
 public void AddProtocol(Protocol protocol)
 {
     if (protocolList.ContainsKey(protocol.type))
     {
         Debugs.Log("[EmptyProtocol] 중복된 프로토콜 등록이있습니다!");
         return;
     }
     protocolList.Add(protocol.type, protocol);
 }
Esempio n. 15
0
 public Vector3D GetFaceNormal(int fid)
 {
     Debugs.CheckRange(fid, 0, FaceCount);
     if (HasFaceNormals)
     {
         return(_facesNormals[fid]);
     }
     throw new InvalidOperationException("Please call UpdateFaceNormals() method before invoke GetNormal() method!");
 }
Esempio n. 16
0
 public Vector3D GetVertexNormal(int vid)
 {
     Debugs.CheckRange(vid, 0, VertexCount);
     if (HasVerticeNormals)
     {
         return(_verticeNormals[vid]);
     }
     throw new InvalidOperationException("Please call UpdateVerticeNormals() method before invoke GetNormal() method!");
 }
Esempio n. 17
0
        public CustomTimerTaskObject()
        {
            secretKey = ++issuedKey;

            float reservedTime = Time.realtimeSinceStartup + UnityEngine.Random.Range(3, 10);

            ExecutedTicks = reservedTime;
            Debugs.LogFormat("CustomTimerTaskObject #{0} reserved at {0}, current: {1}", reservedTime, Time.realtimeSinceStartup);
        }
Esempio n. 18
0
 // Use this for initialization
 void Start()
 {
     //The Get "Debugs" script from Debug Loggers gameobject
     //debugGO = GameObject.FindWithTag("debug");
     debuggerScript   = GameObject.Find("DebugOptions").GetComponent <Debugs>();
     debugShellImpact = debuggerScript.debugShellImpact;
     //
     shellHolder       = GameObject.Find("ShellHolderObject");
     shellHolderScript = shellHolder.GetComponent <ShellHolderScript>();
 }
Esempio n. 19
0
    /// <summary>
    /// 오디오 설정 변경 발생시
    /// 이어폰이나 HDMI 등을 연결시 발생.
    /// </summary>
    /// <param name="deviceWasChanged"></param>
    void OnAudioConfigurationChanged(bool deviceWasChanged)
    {
        int bufferLength, numBuffers;

        AudioSettings.GetDSPBufferSize(out bufferLength, out numBuffers);
        AudioConfiguration config       = AudioSettings.GetConfiguration();
        string             m_audio_info = string.Format("Audio : {0 : #, #} Hz {1} {2} samples {3} buffers", config.sampleRate, config.speakerMode.ToString(), config.dspBufferSize, numBuffers);

        Debugs.Log("[AudioInfo]", m_audio_info);
    }
Esempio n. 20
0
    /// <summary>
    /// 오디오를 리스트에서 삭제한다.
    /// </summary>
    /// <param name="ao"></param>
    static public void RemoveAudioObject(AudioObject ao)
    {
        if (ao == null || Instance == null || Instance.audioObjectList == null)
        {
            return;
        }
        Instance.audioObjectList.Remove(ao);

        Debugs.Log("[AudioObject.Remove] Count:", Instance.audioObjectList.Count);
    }
Esempio n. 21
0
    public void PublishKey()
    {
        if (m_trPlace == null)
        {
            Debugs.LogError("[사운드-키발급] 발급의 대상이 되는 객체가 없습니다! 채널을 먼저 생성하십시오.");
            return;
        }

        m_strFinalKey = string.Concat(m_trPlace.GetInstanceID(), m_strKey);
    }
        /// <summary>
        /// TimerJob을 Global Dispatch Timer에 등록합니다.
        /// 이 메서드는 동작 시간의 유효성을 따로 검사해주지 않습니다.
        /// </summary>
        /// <param name="job">실행할 TimerJob 객체</param>
        public void PushTimerJob(TimerJob job)
        {
            if (job == null)
            {
                Debugs.LogError("Job이 null입니다.");
                return;
            }

            timedJobQueue.Enqueue(job);
        }
Esempio n. 23
0
    public Transform GetAudioChannelRoot(E_AUDIO_CHANNEL_TYPE eChannelType)
    {
        if (!m_AudioChannelList.ContainsKey(eChannelType))
        {
            Debugs.LogError("[사운드] 대상 오디오 채널", eChannelType.ToString(), "이 없습니다!");
            return(null);
        }

        return(m_AudioChannelList[eChannelType].m_trTransform);
    }
        public T Peek()
        {
            if (_size == 0)
            {
                Debugs.LogError("Heap이 비었다.");
                return(default(T));
            }

            return(_items[0].Value);
        }
Esempio n. 25
0
        public void Listen()
        {
            Debugs.Log("[NetworkManager] Listen");
            socket.Bind(endPoint);
            socket.Listen(100);

            while (true)
            {
                BeginAccept();
            }
        }
Esempio n. 26
0
        /// <summary>
        /// keep sure input is ccw
        /// </summary>
        public HEFace AddFace(IndexN <int> vindice)
        {
            Debugs.Assert(vindice.All(id => id >= 0 && id < VertexCount));
            var vertice = new List <HEVertex>(vindice.Length);

            for (int i = 0; i < vindice.Length; i++)
            {
                vertice.Add(_vertices[vindice[i]]);
            }
            return(AddFace(vertice));
        }
Esempio n. 27
0
    /// <summary>
    /// 해당 채널의 해당 객체의 모든 오디오를 중지합니다.
    /// </summary>
    /// <param name="trPlace"></param>
    /// <param name="eAudioChannel"></param>

    public void StopAll(Transform trPlace, E_AUDIO_CHANNEL_TYPE eAudioChannel)
    {
        if (!AvaliableAudioChannel(eAudioChannel))
        {
            if (g_bPrintLog)
            {
                Debugs.LogError("[사운드-중지] 중지할 채널이 없거나 비활성화 중입니다!");
            }
            return;
        }
        m_AudioChannelList[eAudioChannel].StopAll(trPlace);
    }
Esempio n. 28
0
    public void ResetFinishGame()
    {
#if TEST
        Debug.LogWarning(Debugs.ColorString("ResetFinishGame", Color.red));
#endif

        if (objecFinish != null)
        {
            DespawnGameObject(objecFinish);
            objecFinish = null;
        }
    }
Esempio n. 29
0
    public void ResetBattle()
    {
#if TEST
        Debug.LogWarning(Debugs.ColorString("ResetBattle", Color.red));
#endif
        Destroy(panelplayerLeft);
        Destroy(panelplayerRight);
        panelplayerLeft   = null;
        panelplayerRight  = null;
        _panelplayerLeft  = null;
        _panelplayerRight = null;
    }
Esempio n. 30
0
    //public void Play(int nSoundId, Transform trParent, eAudioGroupType eAudioGroup, bool bLocal = false, int nIndex = 0)
    //{
    //    SoundData Data = SoundDataManager.Instance.GetSoundDataByID(nSoundId);
    //    if (Data == null) return;

    //    Play(Data.name, trParent, eAudioGroup, Data.m_eChannelType, bLocal, nIndex);
    //}

    //public void Play(string strSoundName, Transform trParent, eAudioGroupType eAudioGroup, E_AUDIO_CHANNEL_TYPE eChannelType, bool bLocal = false, int nIndex = 0)
    //{
    //    if (m_AudioChannelList.ContainsKey(eChannelType))
    //    {
    //        AudioObject NewAudioObject = m_AudioChannelList[eChannelType].GetAudioObject();
    //        NewAudioObject.SetParent(trParent);
    //        NewAudioObject.transform.localPosition = Vector3.zero;
    //        NewAudioObject.SetAudioOptionType(eAudioOptionType.BGM);
    //        NewAudioObject.SetAudioGroup(eAudioGroup);

    //        LoadAsyncAddCachClipData(NewAudioObject.name, (clip, loadDelay) =>
    //        {
    //            publicSFXAudio.Play(clip);
    //            publicSFXAudio.OnStop = () => {
    //                ClipCachData data = GetCachClipData(clip.name);
    //                if (data == null)
    //                    return;
    //                RemoveClipCachData(data);
    //            };
    //        }, E_AUDIO_CLIP_GROUP.Stop, bLocal);

    //    }
    //}

    public void Pause(Transform trPlace, E_AUDIO_CHANNEL_TYPE eAudioChannel, string strKey)
    {
        if (!AvaliableAudioChannel(eAudioChannel))
        {
            if (g_bPrintLog)
            {
                Debugs.LogError("[사운드-일시정지] 일시정지 할 채널이 없거나 비활성화 중입니다!");
            }
            return;
        }
        m_AudioChannelList[eAudioChannel].Pause(string.Concat(trPlace.GetInstanceID(), strKey));
    }