public void Initialization(PlayerCore core, IServerNotify serverNotify, Func <Vector3, string, Vector3?> findClosestPlayer, PlayerPool pool, Func <Vector2> getRandomPosition, Transform imageDeath, LevelMode levelMode, Func <string, PlayerCore> getPlayerById) { this.serverNotify = serverNotify; this.pool = pool; GetRandomPosition = getRandomPosition; GetPlayerById = getPlayerById; if (serverNotify != null) { multiplayer = true; } Core = core; playerAnimation = new PlayerAnimation(GetComponent <Animator>(), imageDeath); this.levelMode = levelMode; weaponActionController.Initilization(findClosestPlayer, ActivateWeapon, core); }
public PlayerManager(IServerNotify serverNotify, Random rand, PlayerPool pool, MapCore mapCore, ObjectPool <ImageBase> imagesDeath , LevelMode levelMode) : this(rand, pool, mapCore, imagesDeath, levelMode) { this.serverNotify = serverNotify; }