Ejemplo n.º 1
0
        // 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");
        }
Ejemplo n.º 2
0
 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);
     }
 }
Ejemplo n.º 3
0
 public void FrameworkUpdate()
 {
     //base.Update();
     PEIKDE.Log("Test", "Test Update!!");
     PEIMEN_Entity.Event.Trigger <PEIEvent_Test>(this);
     PEIKDE.Log("Test", "Event Send!!");
 }
Ejemplo n.º 4
0
 // 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");
         }
     }
 }
Ejemplo n.º 5
0
 /// <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);
 }
Ejemplo n.º 6
0
 public void SetBaseExit()
 {
     _operationBaseObj  = null;
     _operationBase     = null;
     _isinOperationFlag = false;
     _hasObjFlag        = false;
     PEIKDE.Log("GPD", "Base Exit!");
 }
Ejemplo n.º 7
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!");
     }
 }
Ejemplo n.º 8
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!");
     }
 }
Ejemplo n.º 9
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");
     }
 }
Ejemplo n.º 10
0
 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));
 }
Ejemplo n.º 11
0
        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!!");
        }
Ejemplo n.º 12
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);
    }
Ejemplo n.º 13
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");
    }
Ejemplo n.º 14
0
 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");
 }
Ejemplo n.º 15
0
        // 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);
                }
            }
        }
Ejemplo n.º 16
0
 private void RunAction(object action)
 {
     try
     {
         ((Action)action)();
         //PEIKDE.Log("Loom", "Action With " + ((Action)action).Method.Name);
     }
     catch (Exception e)
     {
         //Interlocked.
         PEIKDE.Log("LoomOrigin", "Action Running Non-fatal Error With E --> " + e);
         //_parent.RemoveLoom(_token);
         PEIKDE.Log("LoomOrigin", "Fix Program Fixed Bug");
     }
     finally
     {
         Interlocked.Decrement(ref numThreads);
     }
 }
Ejemplo n.º 17
0
    protected static T GetIns <T>(bool entityFlag) where T : PEIKnifer
    {
        T obj;

        if (entityFlag)
        {
            obj = (T)PEIMEN_Entity.Ins.gameObject.AddComponent <T>();
            Type t = typeof(T);
            PEIKDE.Log("Singleton", "Get Entity Ins Init With " + t);
        }
        else
        {
            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);
    }
Ejemplo n.º 18
0
        public async void Awake()
        {
            //默认不销毁
            DontDestroyOnLoad(gameObject);

            Event = PEIMEN_System.GetModule <PEIEvent_Manager>();
            Math  = PEIMEN_System.GetModule <PEIMath>();
            Node  = PEIMEN_System.GetModule <PEINode_Manager>();

            //new PEITime_STTimeCC(out Time, gameObject);
            //new PEINet_Origin(out Web, gameObject);

            PEIKDE_Manager.DebugFlag = DebugFlag;
            PEIKDE.Log("Entity", "Init Done ");
            #region state
            //开启整个项目的流程
            Assembly = typeof(PEIMEN_Entity).Assembly;
            await Task.Delay(100);

            #endregion
        }
Ejemplo n.º 19
0
 private void EventCallBack(object sender, PEIEvent_Origin e)
 {
     PEIKDE.Log("Event Test Trigger On +" + sender);
 }
Ejemplo n.º 20
0
        // Update is called once per frame
        public void Update()
        {
            //PEIKDE.Log("PEIKDE");
            if (Input.GetKeyDown(KeyCode.Y))
            {
                InsListR.Add(PEIMEN_Entity.GameObjectPool.Instance("R", InsR, InsTar.transform.position + new Vector3(_insNul, 0, 0), InsTar.transform.rotation));
                _insNul++;
                PEIKDE.Log("asdasdasdasd");
            }
            if (Input.GetKeyDown(KeyCode.U))
            {
                InsListG.Add(PEIMEN_Entity.GameObjectPool.Instance("G", InsG, InsTar.transform.position + new Vector3(_insNul, 0, 0), InsTar.transform.rotation));
                _insNul++;
                PEIKDE.Log("qweqweqweqwe");
            }
            if (Input.GetKeyDown(KeyCode.I))
            {
                InsListB.Add(PEIMEN_Entity.GameObjectPool.Instance("B", InsB, InsTar.transform.position + new Vector3(_insNul, 0, 0), InsTar.transform.rotation));
                _insNul++;
            }
            if (Input.GetKeyDown(KeyCode.H))
            {
                if (InsListR.Count > 0)
                {
                    PEIMEN_Entity.GameObjectPool.Destory("R", InsListR[0]);
                    InsListR.RemoveAt(0);
                }
                //_insNul++;
            }
            if (Input.GetKeyDown(KeyCode.J))
            {
                if (InsListG.Count > 0)
                {
                    PEIMEN_Entity.GameObjectPool.Destory("G", InsListG[0]);
                    InsListG.RemoveAt(0);
                }
                //_insNul++;
            }
            if (Input.GetKeyDown(KeyCode.K))
            {
                if (InsListB.Count > 0)
                {
                    PEIMEN_Entity.GameObjectPool.Destory("B", InsListB[0]);
                    InsListB.RemoveAt(0);
                }
                //_insNul++;
            }
            image.rectTransform.sizeDelta = new Vector2(ScreenScale.x * PEIMEN_Entity.Screen.GetScreenWidthScale(), ScreenScale.x * PEIMEN_Entity.Screen.GetScreenHeightScale());
            if (Input.GetKeyDown(KeyCode.T))
            {
                SceneManager.LoadScene(SceneManager.GetActiveScene().name);
            }
            //base.Update();
            //if (t.Timer())
            //{
            //    LogRNG();
            //    t.Clear();
            //}
            //speed = PEIMEN_ST_CPU.Ins.SpeedCurveTransTool(10,
            //                                      0.5f,
            //                                      2f,
            //                                      trans.GetModel().OldPos,
            //                                      trans.GetModel().Object.transform.position,
            //                                      trans.GetModel().Target.transform.position,
            //                                      trans.GetModel().MoveSpeed,
            //                                      _disFlag,
            //                                      trans.Flag.Flag);

            //SetTime(speed);
        }
Ejemplo n.º 21
0
 private void WWWCallBack(UnityWebRequest obj)
 {
     PEIKDE.Log("Test", obj.downloadHandler.text);
 }
Ejemplo n.º 22
0
 private void JertDone()
 {
     PEIKDE.Log("Jert", "!!JertDone!!");
 }