public ServerClient(NetConnection conn, ServerChampion champion) { Connection = conn; Champion = champion; ActionsPackage = new List<PlayerAction>(); LastAcknowledgedActionID = IDGenerator.NO_ID; AnimData = new ChampionAnimData(); ChampStats = new ChampionStats(100f); //TODO: depend on champion }
static void UpdateAnimationDataFromAction(ChampionAnimData anim, PlayerActionType action) { switch (action) { case PlayerActionType.Idle: anim.Idle = true; break; case PlayerActionType.MoveLeft: --anim.Movement; break; case PlayerActionType.MoveRight: ++anim.Movement; break; default: break; } }