public void LoadData()
    {
        initialized = false;

        if (data == null)
        {
            data = new GameObjectInfinteData();
        }
        else
        {
            data.Reset();
        }

        if (data.code.IsNullOrEmpty())
        {
            data.code = UniqueUtil.CreateUUID4();
        }

        InitParts();

        if (data.lines == null)
        {
            data.lines = new List <Vector3>();

            // TODO config lanes

            data.lines.Add(Vector3.zero.WithX(-data.distanceX));
            data.lines.Add(Vector3.zero.WithX(0f));
            data.lines.Add(Vector3.zero.WithX(data.distanceX));
        }

        SwitchLine(data.currentLine);
    }
Ejemplo n.º 2
0
 public GameCardPlayer()
 {
     uid        = UniqueUtil.CreateUUID4();
     type       = GameCardPlayerType.player;
     typePlayer = GameCardPlayerType.player;
     ClearCardHands();
 }
Ejemplo n.º 3
0
 public virtual void Init()
 {
     uniqueId = UniqueUtil.CreateUUID4();
 }
Ejemplo n.º 4
0
 public GameCard()
 {
     uid  = UniqueUtil.CreateUUID4();
     type = GameCardTypes.cardNormal;
     val  = "";
 }