コード例 #1
0
    //float t;

    private void Awake()
    {
        //PEIKDE.Log("ASDASDASD");
        PEIKDE.AddErrorDel(AddMessage);
        PEIKDE.AddLogDel(AddMessage);
        PEIKDE.AddWarningDel(AddMessage);
    }
コード例 #2
0
ファイル: StepManager.cs プロジェクト: PEIKnifer/PEIMEN_Frame
 // On Frame Init Function  need Init In System Start() 
 protected void FrameInit()
 {
     if (StepLoader && NeedLoader)
     {
         stepBases = StepLoader.StepList;
     }
     overFlag = false;
     NowStep  = 0;
     //try
     //{
     BeginStep();
     //}
     //catch(Exception e)
     //{
     //    PEIKDE.LogError("STM", "Step Audio Manager Ins Get Error + "+e);
     //}
     if (NeedAudioFlag && StepAudioManager.ins)
     {
         StepAudioManager.ins.ChangeAudio(0);
         PEIKDE.Log("STM", "Step Audio Flag On");
     }
     else
     {
         if (!StepAudioManager.ins)
         {
             PEIKDE.Log("STM", "Step Audio Manager Ins Null");
         }
         if (!NeedAudioFlag)
         {
             PEIKDE.Log("STM", "Step Audio Flag OFF");
         }
     }
 }
コード例 #3
0
        /// <summary>
        /// 切换步骤
        /// </summary>
        /// <param name="name"></param>
        public void ChangeStep(string name)
        {
            //PEIKDE.Log("SCT", "Change Name = "+name);
            if (_steps == null)
            {
                return;
            }

            Step step = _steps.Find(x => x.StepName.Equals(name));

            if (step != null)
            {
                //调用上一个步骤的退出函数
                if (CureentStep != null)
                {
                    CureentStep.OnExit();
                }
                //切换最新的步骤函数
                step.OnEnter();
                CureentStep = step;
            }
            else
            {
                PEIKDE.LogError("SCT", "[Step Error] No current step with " + name);
            }
        }
コード例 #4
0
 public void EntrustPlay()
 {
     if (!_entityFlag)
     {
         PEIKDE.LogError("Timer", "PEIMEN_Entity Not Init But You Try To Use It !");
         return;
     }
     if (_l != null)
     {
         if (_loomFlag)
         {
             if (_l.HasElement(TimerUpdateLoom))
             {
                 _l.RemoveElement(TimerUpdateLoom);
             }
             else
             if (_l.HasElement(TimerUpdate))
             {
                 _l.RemoveElement(TimerUpdate);
             }
         }
     }
     else
     {
         //PEIKDE.LogError("Timer", "Timer Not Set L Init But You Try To Play It !");
     }
 }
コード例 #5
0
ファイル: PEIRNG.cs プロジェクト: PEIKnifer/PEIMEN_Frame
 /// <summary>
 /// Test Random Byte Func
 /// </summary>
 /// <param name="buffer">Test Byte Array</param>
 /// <returns></returns>
 public virtual byte[] NextDouble(byte[] buffer)
 {
     //PEIKnifer_SingletonTool.CheckIns_Normal(_seed, SeedIns);
     _seed.NextBytes(buffer);
     PEIKDE.Log("RNG", "You Are Trying To Get Random Byte Array , This Function Is Not Safe , Please Affirm");
     return(buffer);
 }
コード例 #6
0
ファイル: Test.cs プロジェクト: PEIKnifer/PEIMEN_Frame
        // Start is called before the first frame update
        public void Awake()
        {
            if (PEIMEN_Entity.Jert.Set("Test", JertDone))
            {
                _jertMgr = PEIMEN_Entity.Jert.Get("Test");
            }

            _jertR = new PEIJert(_jertMgr);
            _jertG = new PEIJert(_jertMgr);
            _jertB = new PEIJert(_jertMgr);

            ScreenScale.x    = image.rectTransform.sizeDelta.x;
            ScreenScale.y    = image.rectTransform.sizeDelta.y;
            trans            = new PEIMEN_STC_Trans(gameObject, target, true, speed, speed, NullFunction, SimpleTransType.MoveTowards);
            transR           = new PEIMEN_STC_Trans(InsR, target, true, speed * 0.1F, speed, () => { _jertR.Flag = true; }, SimpleTransType.MoveTowards);
            transG           = new PEIMEN_STC_Trans(InsG, target, true, speed * 0.1F, speed, () => { _jertG.Flag = true; }, SimpleTransType.MoveTowards);
            transB           = new PEIMEN_STC_Trans(InsB, target, true, speed * 0.1F, speed, () => { _jertB.Flag = true; }, SimpleTransType.MoveTowards);
            transR.Flag.Flag = true;
            transG.Flag.Flag = true;
            transB.Flag.Flag = true;
            //trans.SetLoom(true);
            //trans.Flag.Flag = true;
            t = new PEIKnifer_Timer();
            t.EntrustTimer(1, true, true, Loop);
            void Loop()
            {
                trans.Flag.Flag = !trans.Flag.Flag;
                PEIKDE.Log("Test", "Timer Done");
            }

            PEIKDE.Log("Test", "Normal Awake");
        }
コード例 #7
0
ファイル: Test.cs プロジェクト: PEIKnifer/PEIMEN_Frame
 public void FrameworkUpdate()
 {
     //base.Update();
     PEIKDE.Log("Test", "Test Update!!");
     PEIMEN_Entity.Event.Trigger <PEIEvent_Test>(this);
     PEIKDE.Log("Test", "Event Send!!");
 }
コード例 #8
0
ファイル: PoolManager.cs プロジェクト: PEIKnifer/PEIMEN_Frame
        private GameObject GetObj(int i, GameObject obj)
        {
            try
            {
                if (InsList.Count < i + 1)
                {
                    InsList.Add(new List <GameObjectPoolInsBase>());
                }

                if (InsList[i].Count > 0)
                {
                    InsList[i][0].gameObject.SetActive(true);
                    InsList[i][0].transform.SetParent(null);
                    InsList[i][0].Refresh();
                    ToolObj = InsList[i][0].gameObject;
                    InsList[i].RemoveAt(0);
                    return(ToolObj);
                }
                else
                {
                    return(Instantiate(obj));
                }
            }
            catch (Exception e)
            {
                PEIKDE.LogError("PMR", "Pool Manager GetObj Error In Index --> " + i + " System Exception -->" + e);
                return(null);
            }
        }
コード例 #9
0
ファイル: PoolManager.cs プロジェクト: PEIKnifer/PEIMEN_Frame
 private void DesObj(int i, string kind, GameObject obj)
 {
     try
     {
         if (InsList.Count < i + 1)
         {
             InsList.Add(new List <GameObjectPoolInsBase>());
             KindList.Add(kind);
         }
         PEIKDE.Log("PMR", "i = " + i);
         PEIKDE.Log("PMR", "Obj" + obj.name);
         PEIKDE.Log("PMR", obj.GetComponent <GameObjectPoolInsBase>().ToString());
         InsList[i].Add(obj.GetComponent <GameObjectPoolInsBase>());
         InsList[i][InsList[i].Count - 1].ReadyInPool();
         InsList[i][InsList[i].Count - 1].gameObject.SetActive(false);
         InsList[i][InsList[i].Count - 1].gameObject.transform.position = Vector3.zero;
         InsList[i][InsList[i].Count - 1].gameObject.transform.rotation = new Quaternion(0, 0, 0, 0);
         InsList[i][InsList[i].Count - 1].transform.SetParent(transform);
         return;
     }
     catch (Exception e)
     {
         PEIKDE.LogError("PMR", "Pool Manager DesObj Error --> " + e);
     }
 }
コード例 #10
0
 public void SetBaseExit()
 {
     _operationBaseObj  = null;
     _operationBase     = null;
     _isinOperationFlag = false;
     _hasObjFlag        = false;
     PEIKDE.Log("GPD", "Base Exit!");
 }
コード例 #11
0
    protected static T GetInsWithTag <T>(string tag)
    {
        T t = GameObject.FindGameObjectWithTag(tag).GetComponent <T>();

        try { t.GetType(); }catch
        {
            PEIKDE.LogError("SLT", "Singleton Miss With Tag " + tag + " (Check your script Ins)");
        }
        return(t);
    }
コード例 #12
0
 public bool OnTouchAndButtonDown()
 {
     if (_operationBase)
     {
         _operationBase.PartBase.Status = (int)PEIKEM_PartBaseStatus.Done;
         return(_operationBase.OnObjGetCaught());
     }
     PEIKDE.LogError("SSPGQ", "GamePad Can`t Get A OperationBase Ins ");
     return(false);
 }
コード例 #13
0
 public void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.tag == OperationTag && !_hasObjFlag)
     {
         _operationBaseObj  = other.gameObject;
         _operationBase     = _operationBaseObj.GetComponent <OperationBase>();
         _isinOperationFlag = true;
         _hasObjFlag        = true;
         PEIKDE.Log("GPD", "Base Enter!");
     }
 }
コード例 #14
0
 public void OnTriggerExit(Collider other)
 {
     if (other.gameObject.tag == OperationTag && _hasObjFlag && _operationBaseObj == other.gameObject)
     {
         _operationBaseObj  = null;
         _operationBase     = null;
         _isinOperationFlag = false;
         _hasObjFlag        = false;
         PEIKDE.Log("GPD", "Base Exit!");
     }
 }
コード例 #15
0
 public virtual void RemoveAsset(PEIObjAssetName opAsset)
 {
     if (AllAssets.ContainsKey(opAsset.OperationName))
     {
         AllAssets.Remove(opAsset.OperationName);
     }
     else
     {
         PEIKDE.Log("POFM", "The Name [" + opAsset.OperationName + "] You Want Remove Is Null");
     }
 }
コード例 #16
0
ファイル: Test.cs プロジェクト: PEIKnifer/PEIMEN_Frame
        public void FrameworkAwake()
        {
            //base.Awake();
            //PEIMEN_Entity.Web.Get("http://47.96.167.8:3003/ISOS/webservice/endTime?", WWWCallBack);
            PEIMEN_Entity.Event.AddListener <PEIEvent_Test>(EventCallBack);
            //trans.Flag.Flag = true;
            //PEIEvent.Ins.Trigger(this,new PEIEvent_Test() { Sender = "asd" });
            //PEIEvent.Ins.Trigger<PEIEvent_Test>(this);
            PEIMEN_Entity.Event.Trigger <PEIEvent_Test>(this);

            PEIKDE.Log("Test", "Test Awake!!");
        }
コード例 #17
0
 protected GameObject InstanceAudio(GameObject ins, string type, Vector3 position, Quaternion rotation)
 {
     try
     {
         return(AudioPoolManager.Ins.Instance(ins, type, position, rotation));
     }
     catch
     {
         PEIKDE.LogError("ACO", "Audio Instance Error With Type --> " + type);
         return(null);
     }
 }
コード例 #18
0
ファイル: Test.cs プロジェクト: PEIKnifer/PEIMEN_Frame
 private void LogRNG()
 {
     //PEIMEN_Entity.WWW.Get("http://47.96.167.8:3003/ISOS/webservice/api?wsdl", WWWCallBack);
     PEIKDE.Log(PEIMEN_Entity.Math.Random.Next(0, 100));
     PEIKDE.Log(PEIMEN_Entity.Math.Random.Next(0, 100));
     PEIKDE.Log(PEIMEN_Entity.Math.Random.Next(0, 100));
     PEIKDE.Log(PEIMEN_Entity.Math.Random.Next(0, 100));
     //PEIKDE.Log(PEIMEN_Entity.Math.Random.Next(0, 100));
     //PEIKDE.Log(PEIMEN_Entity.Math.Random.Next(0, 100));
     //PEIKDE.Log(PEIMEN_Entity.Math.Random.Next(0, 100));
     //PEIKDE.Log(PEIMEN_Entity.Math.Random.Next(0, 100));
 }
コード例 #19
0
ファイル: StepManager.cs プロジェクト: PEIKnifer/PEIMEN_Frame
 //Use For Auto Play Step
 protected void AutoPlayStep()
 {
     try
     {
         stepBases[NowStep].OperationBaseIns.AutoPlay();
         NextStep();
     }
     catch (Exception e)
     {
         PEIKDE.LogError("STM", "Auto Play Next Step Error!");
         PEIKDE.LogError("STM", e.ToString());
     }
 }
コード例 #20
0
 public static GameObject GetGameObject(string name)
 {
     _toolAss = null;
     if (!_manager.AllAssets.TryGetValue(name, out _toolAss))
     {
         PEIKDE.LogError("PGOF", "Finder Didn`t Have GameObject Of Type [" + name + "]");
     }
     if (_toolAss)
     {
         return(_toolAss.gameObject);
     }
     return(null);
 }
コード例 #21
0
 public void ChangeAudio(int ID)
 {
     try
     {
         AudioSource.Stop();
         AudioSource.clip = audioClips[ID];
         AudioSource.Play();
     }
     catch
     {
         PEIKDE.LogError("SAM", "Change Audio Error!!!");
     }
 }
コード例 #22
0
    public static T GetIns <T>() where T : PEIKnifer
    {
        //if (!obj)
        //{
        T   obj;
        var g = new GameObject("PEIMEN_Singleton");

        obj = (T)g.AddComponent <T>();
        Type t = typeof(T);

        PEIKDE.Log("Singleton", "Get Ins Init With " + t);
        // }
        return(obj);
    }
コード例 #23
0
 /// <summary>
 /// Entrust Timer With A Call Back
 /// </summary>
 /// <param name="value">Lifetime</param>
 /// <param name="isLoop">Is Loop Flag</param>
 /// <param name="l">Func Depend PEIKnifer_L Class Entity</param>
 /// <param name="func">CallBack Func</param>
 public void EntrustTimer(float value, bool isLoop, Action func)
 {
     if (!_entityFlag)
     {
         PEIKDE.LogError("Timer", "PEIMEN_Entity Not Init But You Try To Use It !");
         return;
     }
     //PEIKDE.Log("ETimer Init");
     Loop = isLoop;
     Clear();
     SetTime(value);
     _callBack = func;
     _l        = PEIMEN_Entity.L.AddL();
     _l.AddElement(TimerUpdate);
 }
コード例 #24
0
 public virtual void RewriteAsset(PEIObjAssetName opAsset)
 {
     if (AllAssets.ContainsKey(opAsset.OperationName))
     {
         PEIKDE.LogError("POFM", "The Name [" + opAsset.OperationName + "] Of Obj [" + opAsset.gameObject.name + "] Is Same As [" + AllAssets[opAsset.OperationName].gameObject + "] Would You Want Rewrite Anyway ?");
     }
     if (opAsset.OperationName.Trim() != "")
     {
         AllAssets[opAsset.OperationName] = opAsset;
     }
     else
     {
         PEIKDE.LogError("POFM", "Script AssetName On [" + opAsset.gameObject.name + "] Didn`t Have A Name");
     }
 }
コード例 #25
0
 public void ChangeKey(string key)
 {
     _key = key;
     if (_keyL != null)
     {
         _keyL.Clear();
         PEIMEN_Entity.L.RemoveL(_l);
         _l.RemoveElement(Update);
         Init();
     }
     else
     {
         PEIKDE.LogError("Secret", "Change Key Error");
     }
 }
コード例 #26
0
ファイル: PEIMEN_ST_L.cs プロジェクト: PEIKnifer/PEIMEN_Frame
 public void OnUpdate()
 {
     for (int i = 0; i < LList.Count; i++)
     {
         try
         {
             LList[i].Update();
         }
         catch (Exception e)
         {
             LList.RemoveAt(i);
             PEIKDE.LogError("LManager", "Fix Program Fixed L Class Bug Instance With Error " + e);
         }
     }
 }
コード例 #27
0
    private static void Init()
    {
        if (_ins)
        {
            return;
        }
        _ins = GetIns <PEIMEN_Entity>();


        _event = new PEIEvent_Manager();
        _math  = new PEIMath();
        new PEIMEN_STTimeCC(out _time, I.gameObject);
        new PEINet_Origin(out _net, I.gameObject);
        PEIKDE.Log("Entity", "PEIMEN_Entity Init Complete");
    }
コード例 #28
0
        private KeyCode StringConvertToEnum(string str)
        {
            KeyCode color = KeyCode.A;

            try
            {
                color = (KeyCode)Enum.Parse(typeof(KeyCode), str);
            }
            catch (Exception ex)
            {
                PEIKDE.LogError(ex.Message);
                return(color);
            }

            return(color);
        }
コード例 #29
0
ファイル: AnimeUIPage.cs プロジェクト: PEIKnifer/PEIMEN_Frame
 public void Open(PEIKnifer_Delegate_Void_Void del)
 {
     Flag     = true;
     _doneDel = del;
     for (int i = 0; i < UIList.Count; i++)
     {
         UIList[i].Open();
         UIList[i].gameObject.SetActive(true);
     }
     for (int i = 0; i < _colliderList.Count; i++)
     {
         _colliderList[i].enabled = true;
     }
     _del = DelCheck;
     PEIKDE.Log("PG", "OBJ " + gameObject.name + " Anime UI Open");
 }
コード例 #30
0
ファイル: StepManager.cs プロジェクト: PEIKnifer/PEIMEN_Frame
        // On Manager Go To Next Step Function
        protected void NextStep()
        {
            StepOver();
            ++NowStep;
            NowStep += NowStep < stepBases.Count ? 0 : -1;
            try
            {
                if (NeedAudioFlag && StepAudioManager.ins)
                {
                    StepAudioManager.ins.ChangeAudio(NowStep);
                }
            }
            catch
            {
                PEIKDE.LogError("STM", "Step Audio Manager Ins Get Error");
            }
            BeginStep();
            if (NowStep == stepBases.Count - 1)
            {
                if (overFlag)
                {
                    if (NeedAudioFlag && StepAudioManager.ins)
                    {
                        StepAudioManager.ins.ChangeAudio(NowStep + 1);
                    }
                    PEIKDE.Log("STM", "NowStepOverFalse player step --> " + NowStep);
                }
                else
                {
                    if (NeedAudioFlag && StepAudioManager.ins)
                    {
                        StepAudioManager.ins.ChangeAudio(NowStep);
                    }

                    overFlag = true;
                    PEIKDE.Log("STM", "NowStepOverTrue player step --> " + NowStep);
                }
            }
            else
            {
                PEIKDE.Log("STM", "player step --> " + NowStep);
                if (NeedAudioFlag && StepAudioManager.ins)
                {
                    StepAudioManager.ins.ChangeAudio(NowStep);
                }
            }
        }