public GameObject(Game game, float x, float y, int collisionRadius, int visionRadius = 0, uint netId = 0) : base(x, y) { _game = game; _networkIdManager = game.NetworkIdManager; if (netId != 0) { NetId = netId; // Custom netId } else { NetId = _networkIdManager.GetNewNetId(); // Let the base class (this one) asign a netId } Target = null; CollisionRadius = collisionRadius; VisionRadius = visionRadius; Waypoints = new List <Vector2>(); _visibleByTeam = new Dictionary <TeamId, bool>(); var teams = Enum.GetValues(typeof(TeamId)).Cast <TeamId>(); foreach (var team in teams) { _visibleByTeam.Add(team, false); } Team = TeamId.TEAM_NEUTRAL; _movementUpdated = false; _toRemove = false; }
public HandleSpawn(Game game) { _logger = LoggerProvider.GetLogger(); _game = game; _itemManager = game.ItemManager; _playerManager = game.PlayerManager; _networkIdManager = game.NetworkIdManager; }
public Spell(Game game, IChampion owner, string spellName, byte slot) { Owner = owner; SpellName = spellName; Slot = slot; _game = game; SpellData = game.Config.ContentManager.GetSpellData(spellName); _scriptEngine = game.ScriptEngine; _networkIdManager = game.NetworkIdManager; //Set the game script for the spell _spellGameScript = _scriptEngine.CreateObject <IGameScript>("Spells", spellName) ?? new GameScriptEmpty(); //Activate spell - Notes: Deactivate is never called as spell removal hasn't been added _spellGameScript.OnActivate(owner); }
public PlayerManager(Game game) { _game = game; _networkIdManager = game.NetworkIdManager; }
public HandleCastSpell(Game game) { _game = game; _networkIdManager = game.NetworkIdManager; _playerManager = game.PlayerManager; }