Example #1
0
    public BallBase Copy()
    {
        BallBase c = new BallBase();

        c.Initialize(this.BType);
        c.ObjNo          = this.ObjNo;
        c.DisplayName    = this.DisplayName;
        c.ThrowDexterity = this.ThrowDexterity;
        if (CommonFunction.IsNull(this.Options) == false)
        {
            c.Options = this.Options;
        }

        return(c);
    }
Example #2
0
    public static BallBase GetItem(long objNo)
    {
        TableBallData data = Array.Find(Table, i => i.ObjNo == objNo);
        BallBase      item = new BallBase();

        item.Initialize(data.BallType);
        item.RestCount = (sbyte)CommonFunction.ConvergenceRandom(data.StartGap, data.Startprob, data.Con, data.MaxGap);
        item.ObjNo     = data.ObjNo;
        if (GameStateInformation.IsEnglish == false)
        {
            item.DisplayName = data.DisplayName;
            item.Description = data.Description;
        }
        else
        {
            item.DisplayName = data.DisplayNameEn;
            item.Description = data.DescriptionEn;
        }
        item.ThrowDexterity = data.ThrowDexterity;
        return(item);
    }