コード例 #1
0
ファイル: Lever.cs プロジェクト: lshwayne96/5ive
        public override void RestoreWith(State state)
        {
            LeverState leverState = (LeverState)state;

            leverState.RebuildCompoundTypes();

            startRotation         = leverState.prevStartRotation;
            EndRotation           = leverState.prevEndRotation;
            OriginalStartRotation = leverState.originalStartRotation;
            OriginalEndRotation   = leverState.originalEndRotation;
            MovementDirection     = leverState.movementDirection;
            HasSwitchedRotation   = leverState.hasSwitchedRotation;
            IsRotating            = leverState.isRotating;
            hasInitialised        = true;

            if (IsRotating)
            {
                toResumeRotation = true;
            }

            if (HasSwitchedRotation)
            {
                SwitchRotation();
            }
        }