コード例 #1
0
        //this function was prepare for use euler angle rotate
        //public PEIMEN_STC_Trans(GameObject obj, bool needRotate, Vector3 targetPos, Vector3 targetOul)
        //{
        //}

        private void NormalInit(GameObject obj, bool needRotate, bool needScale, float speed, float rotSpeed, float scaleSpeed, PEIKnifer_Delegate_Void_Void callBackT, SimpleTransType type)
        {
            t             = new PEIKnifer_Timer();
            _loomFlag     = false;
            _loopLifeTime = 0;
            _doneDis      = 0.01f;
            _transType    = type;
            _needScale    = needScale;
            _scaleSpeed   = scaleSpeed;
            _callBack     = callBackT;
            _rotSpeed     = rotSpeed;
            _del          = PEIKNF_NullFunction.NullFunction;
            _l            = PEIMEN_Entity.L.AddL();
            _l.AddElement(TransUpdate);
            //l.AddElement(Update);
            //Awake();
            _needRotate = needRotate;
            _moveSpeed  = speed;

            _obj         = obj;
            Flag         = new PEIKnifer_Flag(BeginFunc, BackFunc);
            _oldPos      = _obj.transform.position;
            _oldScl      = _obj.transform.localScale;
            _oldRot      = _obj.transform.rotation;
            model        = new TransModel();
            model.Target = _target;
            model.OldPos = _oldPos;
            model.Object = _obj;
            //PEITime.WeekUp();
        }
コード例 #2
0
 public void SetTransValue(TransModel model)
 {
     _target     = model.Target;
     _obj        = model.Object;
     _oldPos     = _obj.transform.position;
     _oldScl     = _obj.transform.localScale;
     _oldRot     = _obj.transform.rotation;
     _moveSpeed  = model.MoveSpeed;
     _rotSpeed   = model.RotSpeed;
     _scaleSpeed = model.SclSpeed;
 }