コード例 #1
0
    protected override void OnShow(INotification notification)
    {
        if (powerMediator == null)
        {
            powerMediator = Facade.RetrieveMediator("PowerMediator") as PowerMediator;
        }
        GoldType type = (GoldType)notification.Body;

        this.shopType = type;
        switch (type)
        {
        case GoldType.Power:
            panel.maxTime.text = TextManager.GetString("UIPower3");
            panel.Text.text    = TextManager.GetUIString("UI1047");
            panel.dollar.gameObject.SetActive(false);
            panel.power.gameObject.SetActive(true);
            break;

        case GoldType.Euro:
            panel.maxTime.text = TextManager.GetString("UIPower2");
            panel.Text.text    = TextManager.GetUIString("UI1046");
            panel.power.gameObject.SetActive(false);
            panel.dollar.gameObject.SetActive(true);
            break;
        }
        UpdateTimes();
    }
コード例 #2
0
        static public Result GetResult(ICollection <Annotation> annotations, GoldType goldType)
        {
            switch (goldType)
            {
            case GoldType.Joint:
                return(GenerateJointJointResult(annotations));

            case GoldType.JointOnlyOne:
                return(GenerateJointOnlyOneResult(annotations));

            case GoldType.SeparateOverTrueLabelNumber:
                return(GenerateSeparateOverTrueLabelNumberResult(annotations));

            case GoldType.SeparateOverHalf:
                return(GenerateSeparateOverHalfResult(annotations));

            case GoldType.SeperateOverTrueLabelNumberAndHalf:
                return(JointTwoResults(GoldstandardFunction.GenerateSeparateOverTrueLabelNumberResult(annotations), GoldstandardFunction.GenerateSeparateOverHalfResult(annotations)));

            case GoldType.SeperateOverTrueLabelNumberAndHalfAndJoint:
                return(JointThreeResults(GoldstandardFunction.GenerateSeparateOverTrueLabelNumberResult(annotations), GoldstandardFunction.GenerateSeparateOverHalfResult(annotations), GoldstandardFunction.GenerateJointJointResult(annotations)));

            default:
                return(new Result());
            }
        }
コード例 #3
0
    private static GoldType GetNextGoldType(GoldType currentType)
    {
        GoldType retVal = GoldType.PIECE;

        if (currentType == GoldType.PIECE)
        {
            retVal = GoldType.LUMP;
        }
        else if (currentType == GoldType.LUMP)
        {
            retVal = GoldType.PILE;
        }
        else if (currentType == GoldType.PILE)
        {
            retVal = GoldType.HILL;
        }
        else if (currentType == GoldType.HILL)
        {
            retVal = GoldType.MOUNTAIN;
        }
        else if (currentType == GoldType.MOUNTAIN)
        {
            retVal = GoldType.MOUNTAIN;             // Max Piece
        }


        return(retVal);
    }
コード例 #4
0
ファイル: MVFunction.cs プロジェクト: duanbb/PhD-CSharp
 static public void RunMV(GoldType goldType)
 {
     Variable.MVType = goldType;
     for (int groupIndex = 0; groupIndex < GroupVariable.AnnotatorGroups.Length; ++groupIndex)
     {
         Function.WriteBinaryResultFile("MV", groupIndex);
     }
 }
コード例 #5
0
ファイル: Entity.cs プロジェクト: nexusasx10/FivePages
 public Gold(string name, GoldType type)
 {
     Name = name;
     Type = type;
     Size = StandardSize;
     Textures["usual"] = Tuple.Create(new List <Image> {
         Image.FromFile("images/Gold.png")
     }, 0.0);
     Textures["secret"] = Tuple.Create(new List <Image> {
         Image.FromFile("images/Secret.png")
     }, 0.0);
 }
コード例 #6
0
    public override void OnInit()
    {
        base.OnInit();
        ElementContent = ElementContent.Gold;

        //goldType = (GoldType)UnityEngine.Random.Range(0
        //    , Enum.GetValues(typeof(GoldType)).Length);
        goldType = (GoldType)UnityEngine.Random.Range(0, 7);

        if (!isHide)
        {
            ConfirmSprite();
        }
    }
コード例 #7
0
        protected void DropGold(string parameters)
        {
            GoldType tELEPORT = GoldType.TELEPORT;

            try
            {
                tELEPORT = this.ExtractTypeFromParams <GoldType>(parameters);
            }
            catch (Exception)
            {
            }
            ElevatedAccessUserDropSupplyGoldEvent eventInstance = new ElevatedAccessUserDropSupplyGoldEvent {
                GoldType = tELEPORT
            };

            base.ScheduleEvent(eventInstance, this.user);
        }
コード例 #8
0
 public void SetGoldIcon(GoldType goldType_, bool b_IsEnabled_)
 {
     if (goldType_ == GoldType.Primary) ui_Primary.GetComponent<Image>().enabled = b_IsEnabled_;
     if (goldType_ == GoldType.Secondary) ui_Secondary.GetComponent<Image>().enabled = b_IsEnabled_;
 }