Пример #1
0
 public void DrawList(List <Artifact> artifactList, int selfIndex, ArtifactManagement manager)
 {
     this.manager = manager;
     for (int i = 0; i < artifactList.Count; i++)
     {
         ArtifactPreview preview = Instantiate(previewPrefab, holder.transform);
         preview.setArtifact(artifactList[i], i, selfIndex, manager);
     }
 }
Пример #2
0
 public ArtifactController(ICurrentSession session)
 {
     _artifactDao       = new ArtifactDAO();
     _studentDAO        = new StudentDAO();
     _session           = session;
     CredentialId       = _session.LoggedUser.CredentialID;
     ArtifactManagmenet = new ArtifactManagement();
     Student            = _studentDAO.FindOneRecordBy(CredentialId);
 }
Пример #3
0
        public ArtifactManagementShould()
        {
            var _mockGroupTransactionDAO = new Mock <GroupTransactionDAO>();

            _mockGroupTransactionDAO.Setup(x => x.FindOneRecordBy(It.IsAny <int>())).Returns(new GroupTransaction()
            {
                ID = 1
            });

            _artifactManagement = new ArtifactManagement(_mockGroupTransactionDAO.Object);
        }
Пример #4
0
    public void setArtifact(Artifact artifact, int selfIndex, int holderIndex, ArtifactManagement manager)
    {
        image.sprite     = artifact.image;
        bonusLabel.text  = artifact.bonus.ToString();
        this.selfIndex   = selfIndex;
        this.holderIndex = holderIndex;

        clickDetector.onClick.AddListener(() => {
            manager.SetSelectedArtifact(this);
        });
    }
Пример #5
0
 public CharactersActions(Button skipTurnButton, ArtifactManagement artifactManager)
 {
     skipTurnButton.onClick.AddListener(EndTurn);
     this.artifactManager = artifactManager;
 }