示例#1
0
 public TestDrawableRuleset()
     : base(new OsuRuleset())
 {
     // won't compile without this.
     NewResult?.Invoke(null);
     RevertResult?.Invoke(null);
 }
    NewResult nr;                  //结果集操作

    private void Start()
    {
        nt            = new NewTalk();
        Nresult       = new NewResult();
        nConversation = new NewConversation();
        nr            = new NewResult();
        s0            = new string[3, 2];
        c0            = GameObject.Find("c0").GetComponent <mCharacter>();
        c1            = GameObject.Find("c1").GetComponent <mCharacter>();
        c2            = GameObject.Find("c2").GetComponent <mCharacter>();
        c             = isplayer();
        if (c.ID == 0)
        {
            actor = "Partner_1002";
        }
        if (c.ID == 1)
        {
            actor = "Partner_1001";
        }
        if (c.ID == 2)
        {
            actor = "Partner_1003";
        }
        floor = GameData.floor;
    }
示例#3
0
 private async Task InvokeNewResultEvent()
 {
     if (NewResult != null)
     {
         await NewResult.Invoke();
     }
 }
示例#4
0
        /// <summary>
        /// Registers a <see cref="Playfield"/> as a nested <see cref="Playfield"/>.
        /// This does not add the <see cref="Playfield"/> to the draw hierarchy.
        /// </summary>
        /// <param name="otherPlayfield">The <see cref="Playfield"/> to add.</param>
        protected void AddNested(Playfield otherPlayfield)
        {
            otherPlayfield.DisplayJudgements.BindTo(DisplayJudgements);

            otherPlayfield.NewResult              += (d, r) => NewResult?.Invoke(d, r);
            otherPlayfield.RevertResult           += (d, r) => RevertResult?.Invoke(d, r);
            otherPlayfield.HitObjectUsageBegan    += h => HitObjectUsageBegan?.Invoke(h);
            otherPlayfield.HitObjectUsageFinished += h => HitObjectUsageFinished?.Invoke(h);

            nestedPlayfields.Value.Add(otherPlayfield);
        }
示例#5
0
        /// <summary>
        /// Creates a new <see cref="Playfield"/>.
        /// </summary>
        protected Playfield()
        {
            RelativeSizeAxes = Axes.Both;

            hitObjectContainerLazy = new Lazy <HitObjectContainer>(() => CreateHitObjectContainer().With(h =>
            {
                h.NewResult              += (d, r) => NewResult?.Invoke(d, r);
                h.RevertResult           += (d, r) => RevertResult?.Invoke(d, r);
                h.HitObjectUsageBegan    += o => HitObjectUsageBegan?.Invoke(o);
                h.HitObjectUsageFinished += o => HitObjectUsageFinished?.Invoke(o);
            }));
        }
示例#6
0
 private void onNewResult(DrawableHitObject d, JudgementResult r) => NewResult?.Invoke(d, r);
示例#7
0
 private void UpdateTable(EventArgs e)
 {
     NewResult?.Invoke(this, e);
 }
示例#8
0
 /// <summary>
 /// Raises the Converted event to notify the ResultPanel that a new
 /// result is available to display.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="result"></param>
 private void OnConverted(object sender, ResultModel result)
 {
     NewResult?.Invoke(this, result);
 }