public static void Promotion(NWUnit u, int h) { // upon promotion, HP matches HP of original form, and unit is waiting. u.HP = h; u.waiting = true; u.isHealer = true; }
public static void Promotion(NWUnit u, int h) { // upon promotion, HP matches HP of original form, and unit is waiting. u.HP = h; u.fleaActionPoints = 1; u.fleaMovementPoints = 1; }
public void AddUnit(NWUnit unitToAdd) { this.unitList.Add(unitToAdd); // AddUnit doesn't seem to be being called when it should be print("add unit please."); //unitList.Count(); }
public void RpcMoveCurrentUnit(string serializedGridPosition) { //moved here recently might be terrible9/29/16 slime NWUnit activeUnit = null; // check if the player reticle is on top of a unit; make that unit active if so foreach (NWUnit u in NWUnitList.instance.unitList) { /* * // theory: something about being on the client and therefore no unit component, only gameobject. uhhh kind of a stretch though * NWUnit reversionUnit = u.GetComponent<NWUnit>(); * * if (reversionUnit.gridPosition == gridPosition) * { * activeUnit = reversionUnit; * break; * } */ NWUnit reversionUnit = u.GetComponent <NWUnit>(); if (reversionUnit.isMyUnit) { activeUnit = reversionUnit; reversionUnit.isMyUnit = false; } } // this sometimes is not being called // seems to be as such: when client presses m, server does not do this. server needs to do this because server is // the one actually moving stuff. if server does this then it should have all the tools to move the unit? if (activeUnit != null) { NWGameManager.myUnit = activeUnit; } if (activeUnit == null) { print("haha bullet is null for some reason"); } // count is not increasing for client, which it should be. // print(GameManager.instance.unitObjects.Count); print("yay, there is " + activeUnit.gridPosition); // hopefully move unit // cmdmovecurrentunit called here? then server does crap uh hm //TEST BULLSHITCmdDoSomethingUseful(Tile.myTile); NWGameManager.instance.moveCurrentUnit(serializedGridPosition); }