• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Sequence类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Sequence的典型用法代码示例。如果您正苦于以下问题:C# Sequence类的具体用法?C# Sequence怎么用?C# Sequence使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Sequence类属于命名空间,在下文中一共展示了Sequence类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Start

    //public Seq[] sequences;
    // Use this for initialization
    void Start()
    {
        var cz = GetComponent<CombatZone>();
        var wCount = 0;
        foreach (Wav wav in waves) {
            var w = new Wave();
            cz.spawnWaves.Add(w);
            cz.spawnWaves[wCount].delayNextSeq = wav.delaySeq;
            foreach (Seq seq in wav.sequences) {

                    var sq = new Sequence ();
                    cz.spawnWaves [wCount].spawnSeqs.Add (sq);
                    sq.delayNextEvent = seq.delay;
                    sq.pos = seq.pos;
                    for (int i=0; i<seq.amount; i ++) {
                            var e = new SpawnEvent ();//sq.spawnEvents[i];
                            e.enemyType = seq.eType;
                            e.equipped = seq.equipped;
                            e.paratrooper = seq.chute;
                            Vector2 p = transform.position;
                            e.offset = p + sq.pos + (seq.offset * i);
                            sq.spawnEvents.Add (e);
                    }

            }
            wCount++;
        }
    }
开发者ID:Libeedo,项目名称:psycho-bob,代码行数:30,代码来源:CombatZoneManager.cs


示例2: buildTweener

    public override Tweener buildTweener(Sequence sequence, int frameRate)
    {
        if(go == null) return null;

        //active won't really be set, it's just a filler along with ease
        return HOTween.To(go, getTime(frameRate), new TweenParms().Prop("active", new AMPlugGOActive(setActive)).Ease(EaseType.Linear));
    }
开发者ID:nathanfunk,项目名称:MateAnimator,代码行数:7,代码来源:AMGOSetActiveKey.cs


示例3: Create

        private Sequence<InstructionNode> Create(IEnumerator<XamlInstruction> stream)
        {
            var nodes = new Sequence<InstructionNode>();

            while (IsLeading(stream.Current))
            {
                var currentNode = new InstructionNode { Leading = stream.Current };
                var continueWorking = true;
                while (stream.MoveNext() && continueWorking)
                {
                    if (IsLeading(stream.Current))
                    {
                        currentNode.Children = Create(stream);
                    }

                    var xamlNode = stream.Current;

                    if (IsTrailing(xamlNode))
                    {
                        continueWorking = false;
                        currentNode.Trailing = stream.Current;
                    }
                    else
                    {
                        currentNode.Body.Add(stream.Current);
                    }
                }

                nodes.Add(currentNode);
            }

            return nodes;
        }
开发者ID:grokys,项目名称:OmniXAML,代码行数:33,代码来源:InstructionTreeBuilder.cs


示例4: SetUp

        public void SetUp()
        {
            _gatingSequence = new Sequence(Sequencer.InitialCursorValue);

            _sequencer = new Sequencer(new SingleThreadedClaimStrategy(BufferSize), new SleepingWaitStrategy());
            _sequencer.SetGatingSequences(_gatingSequence);
        }
开发者ID:Xamarui,项目名称:Disruptor-net,代码行数:7,代码来源:SequencerTests.cs


示例5: EnemySlime

        public EnemySlime()
        {
            Sprite = Support.TiledSpriteFromFile("/Application/assets/slime_green_frames.png", 4, 4);

            IdleAnimation = new Support.AnimationAction(Sprite, 0, 8, 0.5f, looping: true);
            JumpInAnimation = new Support.AnimationAction(Sprite, 8, 12, 0.3f, looping: false);
            JumpMidAnimation = new Support.AnimationAction(Sprite, 12, 13, 1.0f, looping: false);
            JumpOutAnimation = new Support.AnimationAction(Sprite, 13, 16, 0.2f, looping: false);

            JumpAnimationSequence = new Sequence();
            JumpAnimationSequence.Add(JumpInAnimation);
            JumpAnimationSequence.Add(new CallFunc(this.Jump));
            JumpAnimationSequence.Add(JumpMidAnimation);
            JumpAnimationSequence.Add(new DelayTime() { Duration = 0.40f });
            JumpAnimationSequence.Add(JumpOutAnimation);
            JumpAnimationSequence.Add(new DelayTime() { Duration = 0.05f });
            JumpAnimationSequence.Add(IdleAnimation);

            this.AddChild(Sprite);
            Sprite.RunAction(IdleAnimation);

            //            CollisionDatas.Add(new EntityCollider.CollisionEntry() {
            //	            type = EntityCollider.CollisionEntityType.Enemy,
            //				owner = this,
            //				collider = Sprite,
            //				center = () => GetCollisionCenter(Sprite) + new Vector2(0.0f, -8.0f),
            //				radius = () => 24.0f,
            //			});
            //
            //			GroundFriction = new Vector2(0.85f);
            Health = 2.0f;
            MoveDelay = 3.0f;
        }
开发者ID:JunyaHosokawa,项目名称:PSM,代码行数:33,代码来源:EnemySlime.cs


示例6: ValidateSingleCharDnaSequence

        public void ValidateSingleCharDnaSequence()
        {
            // Gets the actual sequence and the alphabet from the Xml
            string alphabetName = this.utilityObj.xmlUtil.GetTextValue(
                Constants.SimpleDnaAlphabetNode, Constants.AlphabetNameNode);
            string actualSequence = this.utilityObj.xmlUtil.GetTextValue(
                Constants.SimpleDnaAlphabetNode, Constants.ExpectedSingleChar);

            // Logs information to the log file
            ApplicationLog.WriteLine(string.Concat(
                "Sequence BVT: Sequence is as expected."));

            Sequence createSequence = new Sequence(
                Utility.GetAlphabet(alphabetName), actualSequence);

            Assert.IsNotNull(createSequence);

            // Validate the createdSequence            
            string seqNew = new string(createSequence.Select(a => (char)a).ToArray());
            Assert.AreEqual(seqNew, actualSequence);

            ApplicationLog.WriteLine(string.Concat(
                "Sequence BVT: Sequence is as expected."));

            Assert.AreEqual(Utility.GetAlphabet(alphabetName), createSequence.Alphabet);
            ApplicationLog.WriteLine(string.Concat(
                "Sequence BVT: Sequence Alphabet is as expected."));

            ApplicationLog.WriteLine(
                "Sequence BVT: The DNA with single character Sequence is completed successfully.");
        }
开发者ID:cpatmoore,项目名称:bio,代码行数:31,代码来源:SequenceBvtTestCases.cs


示例7: SmithWatermanProteinSeqAffineGap

        public void SmithWatermanProteinSeqAffineGap()
        {
            IPairwiseSequenceAligner sw = new SmithWatermanAligner
                {
                    SimilarityMatrix = new SimilarityMatrix(SimilarityMatrix.StandardSimilarityMatrix.Blosum62),
                    GapOpenCost = -8,
                    GapExtensionCost = -1,
                };

            ISequence sequence1 = new Sequence(Alphabets.Protein, "HEAGAWGHEE");
            ISequence sequence2 = new Sequence(Alphabets.Protein, "PAWHEAE");
            IList<IPairwiseSequenceAlignment> result = sw.Align(sequence1, sequence2);
            AlignmentHelpers.LogResult(sw, result);

            IList<IPairwiseSequenceAlignment> expectedOutput = new List<IPairwiseSequenceAlignment>();
            IPairwiseSequenceAlignment align = new PairwiseSequenceAlignment();
            PairwiseAlignedSequence alignedSeq = new PairwiseAlignedSequence
                {
                    FirstSequence = new Sequence(Alphabets.Protein, "AWGHE"),
                    SecondSequence = new Sequence(Alphabets.Protein, "AW-HE"),
                    Consensus = new Sequence(Alphabets.AmbiguousProtein, "AWGHE"),
                    Score = 20,
                    FirstOffset = 0,
                    SecondOffset = 3
                };
            align.PairwiseAlignedSequences.Add(alignedSeq);
            expectedOutput.Add(align);

            Assert.IsTrue(AlignmentHelpers.CompareAlignment(result, expectedOutput));
        }
开发者ID:cpatmoore,项目名称:bio,代码行数:30,代码来源:AlignerTests.cs


示例8: FetchStatement

		public FetchStatement(CursorPositionToken cursorPosition, CursorName cursorName, Sequence<VariableName> destinationVariables) {
			Debug.Assert(cursorPosition != null);
			Debug.Assert(cursorName != null);
			this.cursorPosition = cursorPosition;
			this.cursorName = cursorName;
			this.destinationVariables = destinationVariables.ToList();
		}
开发者ID:avonwyss,项目名称:bsn-modulestore,代码行数:7,代码来源:FetchStatement.cs


示例9: GetCompositionOfPeptide

 /// <summary>
 /// The get composition of peptide.
 /// </summary>
 /// <param name="peptide">
 /// The peptide.
 /// </param>
 /// <returns>
 /// The <see cref="Composition"/>.
 /// </returns>
 public static Composition GetCompositionOfPeptide(string peptide)
 {
     Sequence peptideSequence = new Sequence(peptide, AminoAcidSet.GetStandardAminoAcidSet());
     var composition = peptideSequence.Composition;
     composition += Composition.H2O;
     return composition;
 }
开发者ID:PNNL-Comp-Mass-Spec,项目名称:IMS-Informed-Library,代码行数:16,代码来源:PeptideUtil.cs


示例10: Can_be_reset

 public void Can_be_reset()
 {
     var sequence = new Sequence(100);
     var value = sequence.Next;
     sequence.Reset();
     Assert.Equal(100, sequence.Next);
 }
开发者ID:rbuskov,项目名称:Conjurer,代码行数:7,代码来源:SequenceTests.cs


示例11: TableForeignKeyConstraint

		public TableForeignKeyConstraint(ConstraintName constraintName, Sequence<ColumnName> columnNames, Qualified<SchemaName, TableName> refTableName, Optional<Sequence<ColumnName>> refColumnNames, Sequence<ForeignKeyAction> keyActions): base(constraintName) {
			Debug.Assert(refTableName != null);
			this.columnNames = columnNames.ToList();
			this.refTableName = refTableName;
			this.refColumnNames = refColumnNames.ToList();
			this.keyActions = keyActions.ToList();
		}
开发者ID:avonwyss,项目名称:bsn-modulestore,代码行数:7,代码来源:TableForeignKeyConstraint.cs


示例12: ExecutableNodeFactory

        public ExecutableNodeFactory(Executable executable,Executables collection)
        {
            _collection = collection;
            _executable = (DtsContainer)executable;
            _host = _executable as TaskHost;
            _seq = _executable as Sequence;
            _foreachloop = _executable as ForEachLoop;
            _forloop = _executable as ForLoop;
            _psExecutable = PSObject.AsPSObject(_executable);

            if (null != _host)
            {
                _psExecutable.Properties.Add( new PSNoteProperty( "IsTaskHost", true ));
                _mainPipe = _host.InnerObject as MainPipe;
            }
            if (null != _mainPipe)
            {
                _psExecutable.Properties.Add(new PSNoteProperty("IsDataFlow", true));
            }
            if (null != _seq)
            {
                _psExecutable.Properties.Add(new PSNoteProperty("IsSequence", true));
            }
            if (null != _foreachloop)
            {
                _psExecutable.Properties.Add(new PSNoteProperty("IsForEachLoop", true));
            }
            if (null != _forloop)
            {
                _psExecutable.Properties.Add(new PSNoteProperty("IsForLoop", true));
            }
        }
开发者ID:beefarino,项目名称:bips,代码行数:32,代码来源:ExecutableNodeFactory.cs


示例13: OnJellyfishDrain

 void OnJellyfishDrain()
 {
     pulse = DOTween.Sequence().Pause().SetLoops(loopCount);
     pulse.Append(image.DOColor(toColor, intervalOn).SetEase(easeOn));
     pulse.Append(image.DOColor(Color.black, intervalOff).SetEase(easeOff));
     pulse.Play();
 }
开发者ID:TheWanderingTree,项目名称:temple,代码行数:7,代码来源:Pulse_BatteryDrain.cs


示例14: TestMUMmerAlignerMultipleMum

        public void TestMUMmerAlignerMultipleMum()
        {
            string reference = "ATGCGCATCCCCTT";
            string search = "GCGCCCCCTA";

            Sequence referenceSeq = null;
            Sequence searchSeq = null;

            referenceSeq = new Sequence(Alphabets.DNA, reference);
            searchSeq = new Sequence(Alphabets.DNA, search);

            List<ISequence> searchSeqs = new List<ISequence>();
            searchSeqs.Add(searchSeq);

            MUMmerAligner mummer = new MUMmerAligner();
            mummer.LengthOfMUM = 4;
            mummer.PairWiseAlgorithm = new NeedlemanWunschAligner();

            IList<IPairwiseSequenceAlignment> result = mummer.AlignSimple(referenceSeq, searchSeqs);

            // Check if output is not null
            Assert.AreNotEqual(null, result);
            IList<IPairwiseSequenceAlignment> expectedOutput = new List<IPairwiseSequenceAlignment>();
            IPairwiseSequenceAlignment align = new PairwiseSequenceAlignment();
            PairwiseAlignedSequence alignedSeq = new PairwiseAlignedSequence();
            alignedSeq.FirstSequence = new Sequence(Alphabets.DNA, "ATGCGCATCCCCTT");
            alignedSeq.SecondSequence = new Sequence(Alphabets.DNA, "--GCGC--CCCCTA");
            alignedSeq.Consensus = new Sequence(AmbiguousDnaAlphabet.Instance, "ATGCGCATCCCCTW");
            alignedSeq.Score = -11;
            alignedSeq.FirstOffset = 0;
            alignedSeq.SecondOffset = 2;
            align.PairwiseAlignedSequences.Add(alignedSeq);
            expectedOutput.Add(align);
            Assert.IsTrue(CompareAlignment(result, expectedOutput));
        }
开发者ID:cpatmoore,项目名称:bio,代码行数:35,代码来源:MUMmerAlignerTests.cs


示例15: FillAlignedSequencesWithDifferentCountTest

        public void FillAlignedSequencesWithDifferentCountTest()
        {
            // AACGCTAG
            // ATCCTAG
            var sequence1 =
                new Sequence(
                    new[]
                        {
                            Nucleotide.A, Nucleotide.A, Nucleotide.C, Nucleotide.G, Nucleotide.C, Nucleotide.T,
                            Nucleotide.A, Nucleotide.G
                        },
                    1);
            var sequence2 =
                new Sequence(
                    new[]
                        {
                            Nucleotide.A, Nucleotide.T, Nucleotide.C, Nucleotide.C, Nucleotide.T, Nucleotide.A,
                            Nucleotide.G
                        },
                    2);

            var estimator = new OperationDistanceEstimator(4, 2, 0, 1);
            var multipleAlignment1 = new MultipleAlignment(1, new[] { sequence1 }, estimator);
            var multipleAlignment2 = new MultipleAlignment(2, new[] { sequence2 }, estimator);
            var newMultipleAlignment = new MultipleAlignment(3, multipleAlignment1, multipleAlignment2);
            var algorithm = new MultipleAlignmentAlgorithm(estimator);
            var groupAlgorithm = new GroupAlignmentAlgorithm(estimator);
            algorithm.FillAlignedSequences(newMultipleAlignment, groupAlgorithm.GeneratePairAlignmentsMap(newMultipleAlignment));
        }
开发者ID:Cabyrc,项目名称:GroupAlignment,代码行数:29,代码来源:MultipleAlignmentAlgorithmTests.cs


示例16: CreateSimpleStatsAndVerifyAlphabetIsReturned

        public void CreateSimpleStatsAndVerifyAlphabetIsReturned()
        {
            ISequence sequence = new Sequence(Alphabets.DNA, "A");
            SequenceStatistics stats = new SequenceStatistics(sequence);

            Assert.AreEqual(Alphabets.DNA, stats.Alphabet);
        }
开发者ID:cpatmoore,项目名称:bio,代码行数:7,代码来源:SequenceStatisticsTests.cs


示例17: IteratePartsKNN

 public IEnumerable<Bitmap> IteratePartsKNN(IResult res, double dqp, float stddev, float mean, Sequence seq)
 {
     var sym = this.Discretize(dqp, stddev, mean);
     yield return seq.Unravel(sym);
     var left = sym - 1;
     var right = sym + 1;
     bool do_next = true;
     while (do_next) {
         do_next = false;
         var __left = this.Discretize(dqp - res.CoveringRadius, stddev, mean);
         if (0 <= left && __left <= left) {
             yield return seq.Unravel(left);
             --left;
             do_next = true;
         }
         var __right = this.Discretize(dqp + res.CoveringRadius, stddev, mean);
         if (right <= __right && right < seq.Sigma) {
             yield return seq.Unravel(right);
             ++right;
             do_next = true;
         }
         /*Console.WriteLine ("left: {0}, right: {1}, __left: {2}, __right: {3}",
                            left, right, __left, __right);*/
     }
 }
开发者ID:KeithNel,项目名称:natix,代码行数:25,代码来源:CompactPivotsSEQINTSvS.cs


示例18: CreateSimpleStatsAndVerifyCount

        public void CreateSimpleStatsAndVerifyCount()
        {
            ISequence sequence = new Sequence(Alphabets.DNA, "ACGT--ACGT--ACGT--");
            SequenceStatistics stats = new SequenceStatistics(sequence);

            Assert.AreEqual(18, stats.TotalCount);
        }
开发者ID:cpatmoore,项目名称:bio,代码行数:7,代码来源:SequenceStatisticsTests.cs


示例19: ExpressionColumnFunctionCalls

		public ExpressionColumnFunctionCalls(TableName tableName, ColumnName columnName, Sequence<NamedFunction> functions): base(functions.Item, functions.Next) {
			Debug.Assert(tableName != null);
			Debug.Assert(columnName != null);
			columnNameQualified = new Qualified<TableName, ColumnName>(tableName, columnName);
			Debug.Assert(!functions.Item.FunctionName.IsQualified);
			functions.Item.FunctionName.LockOverride();
		}
开发者ID:avonwyss,项目名称:bsn-modulestore,代码行数:7,代码来源:ExpressionColumnFunctionCalls.cs


示例20: checkCellWin

 public Boolean checkCellWin(Cell c)
 {
     Sequence seq;
       if (c.type == goalMutation){
     //Support.SoundSystem.Instance.Play("blip.wav");
     goalSprite.Visible = false;
     var right = Support.TiledSpriteFromFile("/Application/assets/display_GOOD.png", 1, 1);
     GameScene.Instance.AddChild(right);
     right.CenterSprite();
     right.Quad.S = right.TextureInfo.TextureSizef/2;
     right.Position = goalSprite.Position;
     right.VertexZ = 1;
     seq = new Sequence();
     seq.Add(new DelayTime(2));
     seq.Add(new CallFunc(() => { GameScene.Instance.RemoveChild(right, true); goalSprite.Visible = true;}));
     GameScene.Instance.RunAction(seq);
     return true;
       }
       //Support.SoundSystem.Instance.Play("blip.wav");
       goalSprite.Visible = false;
       var wrong = Support.TiledSpriteFromFile("/Application/assets/display_BAD.png", 1, 1);
       wrong.CenterSprite();
       wrong.Quad.S = wrong.TextureInfo.TextureSizef/2;
       wrong.Position = goalSprite.Position;
       wrong.VertexZ = 1;
       GameScene.Instance.AddChild(wrong);
       seq = new Sequence();
       seq.Add(new DelayTime(2));
       seq.Add(new CallFunc(() => { GameScene.Instance.RemoveChild(wrong, true); goalSprite.Visible = true;;}));
       GameScene.Instance.RunAction(seq);
       return false;
 }
开发者ID:emmett9001,项目名称:Cybrid-7X,代码行数:32,代码来源:WinSection.cs



注:本文中的Sequence类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Serial类代码示例发布时间:2022-05-24
下一篇:
C# Seq类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap