private void setCharacterPosition(dpGame.CharacterController chr) { if (u.status == 0) { return; } if (forbid) { return; } if (chr.getState() == 1) { BankController bank; if (boat.getLR() == 0) { bank = leftBank; } else { bank = rightBank; } boat.outOfBoat(chr.getTag()); chr.moveToBank(bank); // 动作分离版改变move调用方式 // chr.goMoving(bank.getPos(chr.getTag())); chr.getObj().transform.position = bank.getPos(chr.getTag()); bank.moveToBank(chr); } else { BankController bank = chr.getBank(); if (boat.getLR() == bank.getLR()) { if (!boat.isFull()) { bank.outOfBank(chr.getTag()); chr.moveToBoat(boat); // 动作分离版改变move调用方式 // chr.goMoving(boat.getSeat()); // actionManager.moveCharacter(chr.getObj(), boat.getSeat(), speed); chr.getObj().transform.position = boat.getSeat(); boat.moveToBoat(chr); } } } u.status = judger.checkGame(); }
public void moveCharacters(dpGame.CharacterController chr) { if (u.status == 0) { return; } if (forbidEvent()) { return; } if (chr.getState() == 1) { BankController bank; if (boat.getLR() == 0) { bank = leftBank; } else { bank = rightBank; } boat.outOfBoat(chr.getTag()); chr.moveToBank(bank); chr.goMoving(bank.getPos(chr.getTag())); bank.moveToBank(chr); } else { BankController bank = chr.getBank(); if (boat.getLR() == bank.getLR()) { if (!boat.isFull()) { bank.outOfBank(chr.getTag()); chr.moveToBoat(boat); chr.goMoving(boat.getSeat()); boat.moveToBoat(chr); } } } u.status = checkGame(); }