示例#1
0
 public void Play(string _folderPath, int _frame, LoopModes _loopMode)
 {
     play       = false;
     FolderPath = _folderPath;
     SetFrame(_frame);
     LoopMode = _loopMode;
     play     = true;
 }
示例#2
0
 public void Play(string _folderPath, int _frame, LoopModes _loopMode, float _speed)
 {
     play       = false;
     FolderPath = _folderPath;
     SetFrame(_frame);
     LoopMode = _loopMode;
     Speed    = _speed;
     play     = true;
 }
示例#3
0
 public void Play(string _folderPath, int _frame, LoopModes _loopMode, float _speed, AnimationCurve _curve)
 {
     play       = false;
     FolderPath = _folderPath;
     SetFrame(_frame);
     LoopMode = _loopMode;
     Speed    = _speed;
     Curve    = _curve;
     play     = true;
 }
示例#4
0
    public void GivePath(List<MovableObjectController.MovableObjectPosition> positions, float speed, bool interruptable, MoveModes moveMode, LoopModes loopMode)
    {
        if (State == MoveableObjectStates.MOVING && !mInterruptable)
        {
            return;
        }

        mPositionQueue.Clear();
        mPositionQueue = positions;
        mMoveSpeed = speed;
        mMoveMode = moveMode;
        mLoopMode = loopMode;

        mMoveDirection = ((mOriginalPosition + mPositionQueue[0].Position) - transform.position);
        mOriginalMagnitude = mMoveDirection.magnitude;
        mMoveDirection = mMoveDirection.normalized;

        mCurrentMoveTime = 0f;
        mInterruptable = interruptable;
        mPreviousPosition = mCurrentPosition;
        mCurrentPosition = -1;
        mTargetPosition = 0;
        State = MoveableObjectStates.MOVING;
    }