Exemplo n.º 1
0
    public void TXT_move_card_to(Card_m c, cardWhere towhere)
    {
        //0进入层级
        if (c.upone == null)
        {
            beens.Add_in_layer(c, this);
        }
        //1变形悬在空中
        bool tonewplace = false;

        switch (towhere)
        {
        case cardWhere.space3d: tonewplace = c.Transform_ToMini(Vector3.zero); break;

        case cardWhere.hand: tonewplace = c.Transform_ToCard(); break;

        case cardWhere.deck: tonewplace = c.Transform_ToDeck(); break;
        }
        //2放下到指定地方
        //转变所有者
        c.player().List_removeone(c.ID);
        c.upone = this;
        c.player().List_addone(c);
        //注册 //如果到了新地方就刷新call
        if (tonewplace)
        {
            //print("-----");
            beens.removeCall(c);
            if (towhere == cardWhere.hand || towhere == cardWhere.space3d)
            {
                beens.add_in_call_L(c);
            }
        }
    }
Exemplo n.º 2
0
 public Call_mini(Card_m c, int id, bool after, bool add)
 {
     which = c;
     ID    = id;
     info += after ? 1 : 0;
     info += add ? 2 : 0;
     info += (int)change_k1.mini;
 }
Exemplo n.º 3
0
 public step_target(Card_m user, Trigger t, order o)
 {
     this.user = user;
     //--------------------------------|
     this.useTr   = t;
     this.usecard = o.usecard;
     //---------------------------------|
     this.targetcard  = o.Target_card;
     this.targretposs = o.Target_pos;
     this.target_tr   = o.Target_trigger;
 }
Exemplo n.º 4
0
 public void add_in_call_L(Card_m c)
 {
     if (Call_List.Contains(c))
     {
         return;                       //报错
     }
     else
     {
         Call_List.Add(c);
     }
 }
Exemplo n.º 5
0
    public void List_addone(Card_m c)
    {
        cards.Add(c.ID);
        switch (c.state)
        {
        case cardWhere.deck: indeck.Add(c.ID); break;

        case cardWhere.hand: inhand.Add(c.ID); break;

        case cardWhere.space3d: inspace.Add(c.ID); break;
        }
    }
Exemplo n.º 6
0
 public void Add_in_layer(Card_m c, miniG p)
 {
     c.upone = p;
     IDmini.Add(c.ID, c); c.player().cards.Add(c.ID);
     foreach (Trigger_bycall t in c.callTrigger)
     {
         IDtrigger.Add(t.ID, t);
     }
     if (c.minion)
     {
         foreach (Trigger_byinput t in c.minion.skillTrigger)
         {
             IDtrigger.Add(t.ID, t);
         }
     }
 }
Exemplo n.º 7
0
    public override bool run_and_Pop(Dictionary <CardTxt, step_target> data)
    {
        step_target d       = data[this];
        Card_m      user    = data[this].user;
        Card_m      usecard = data[this].usecard;

        if (d.nextstep == 0)
        {  //还要扣费
            //call
            docall(user.host(), new Call_mini(usecard, usecard.ID, false, true));
            d.nextstep = 1; return(false);
        }
        else if (d.nextstep == 1)
        {
            //召唤
            user.player().TXT_move_card_to(usecard, cardWhere.space3d);

            usecard.transform.position = d.targretposs;
            //call
            docall(user.host(), new Call_mini(usecard, usecard.ID, true, true));
            return(true);
        }
        return(true);
    }
Exemplo n.º 8
0
    //change

    //clean
    public void relink(Card_m m, miniG p)
    {
        m.player().cards.Remove(m.ID);
    }
Exemplo n.º 9
0
 public void removeCall(Card_m c)
 {
     Call_List.Remove(c);
 }