Exemple #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);
            }
        }
    }
Exemple #2
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);
         }
     }
 }
Exemple #3
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);
    }
Exemple #4
0
    //change

    //clean
    public void relink(Card_m m, miniG p)
    {
        m.player().cards.Remove(m.ID);
    }