public void MovePlayer(int tag, Tuple <double, double> speed) { double m = players[tag].Speed(); Tuple <double, double> NewVect = Utily.Normalizing(speed, players[tag].Speed()); map.MovePlayer(tag, NewVect); }
public int FirePlayer(int tag, Tuple <double, double> vect) { int dmg = players[tag].attack(); if (dmg <= 0) { return(-1); } Tuple <double, double> NewVect = Utily.Normalizing(vect, players[tag].ArrowSpeed()); int arTag = Utily.GetTag(); int nowid = players[tag].inventory.getCurrentArrow().id; if (players[tag].getItemRight() is Magic) { nowid = players[tag].rightHand; } Arrows[arTag] = new AArow(tag, dmg, nowid); map.FirePlayer(tag, arTag, NewVect.Item1, NewVect.Item2); return(arTag); }