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); } } }
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; }
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; }
public void add_in_call_L(Card_m c) { if (Call_List.Contains(c)) { return; //报错 } else { Call_List.Add(c); } }
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; } }
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); } } }
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); }
//change //clean public void relink(Card_m m, miniG p) { m.player().cards.Remove(m.ID); }
public void removeCall(Card_m c) { Call_List.Remove(c); }