Ejemplo n.º 1
0
 public int CountMarkByType(TypeMark type, int videoId)
 {
     return(db.Marks.Where(x => x.VideoId == videoId && x.TypeMark == type).Count());
 }
 public TypeMarkResponseDto(TypeMark typeMark)
 {
     Id       = typeMark.Id;
     TypeMark = typeMark.Name;
 }
Ejemplo n.º 3
0
    public void mark(TypeMark typeMark = TypeMark.NONE) // маркировка клетки
    {
        //print("█ #"+m_numValue+", ticket#"+getMyTicket().number+" newTypeMark:" + typeMark + " old:" + markType);
        if (typeMark == markType)
        {
            return;
        }
        if (markType == TypeMark.WIN)
        {
            //print("█ #" + m_numValue + " when WIN!, newState: " + typeMark);
            return;
        }
        else if (markType == TypeMark.WITH_OUT)
        {
            markSR.tag = "ticketBall";
            stopPlayPrewin(true);
        }

        if (!markSR)
        {
            //Instantiate(Sprite);
            GameObject go = new GameObject();
            go.transform.parent = this.transform;
            go.tag                      = "ticketBall";
            go.name                     = go.tag + numValue;
            markSR                      = go.AddComponent <SpriteRenderer>();
            markSR.sprite               = Instantiate(greenBall);
            markSR.transform.position   = Vector3.zero;
            markSR.transform.localScale = transform.localScale;
            markSR.sortingOrder         = orderLayer + 1;
            go.transform.position       = Vector3.zero;
            go.transform.localPosition  = Vector3.zero;
        }
        markSR.enabled = true;
        switch (typeMark)
        {
        case TypeMark.PREWIN: { setOriol(Oriol.PREWIN); } break;

        case TypeMark.WITH_OUT: {
            //print("█ #"+m_numValue+" WITH_OUT, prewState: " + markType);
            startPlayPreWin();
            tag = "missingBall";
        } break;

        case TypeMark.NONE: { } break;

        case TypeMark.PRESENT: { } break;

        case TypeMark.WIN: {
            //print("█ █#" + m_numValue + " WIN, prewState: " + markType + " markSR.name == "+ markSR.name);
            markSR.sprite = markSprite;
            markSR.color  = Color.yellow;
            setOriol(Oriol.NONE);
            if (GetComponent <Scaling>() == null)
            {
                Scaling.set(gameObject, 1.5f, 0.75f, 1);         // # маштабирование каждого шара на виновом состоянии
            }
            if (GetComponent <Flickering>() == null)
            {
                Flickering.set(gameObject, 0.75f, 1);         // #V мигание каждого шара на виновом состоянии
            }
        } break;
        }
        markType = typeMark;
        isMarked = true;
    }