public Minion( MinionSpawnType type, MinionSpawnPosition position, uint netId = 0 ) : this(type, position, new List <Vector2>(), netId) { }
public LaneMinion( Game game, MinionSpawnType spawnType, string position, uint netId = 0 ) : this(game, spawnType, position, new List <Vector2>(), netId) { }
public Minion(Game game, uint id, MinionSpawnType type, MinionSpawnPosition position, List <Vector2> mainWaypoints) : base(game, id, "", new MinionStats(), 40, 0, 0, 1100) { this.minionType = type; this.spawnPosition = position; this.mainWaypoints = mainWaypoints; this.curMainWaypoint = 0; var spawnSpecifics = _game.GetMap().GetMinionSpawnPosition(spawnPosition); setTeam(spawnSpecifics.Item1); setPosition(spawnSpecifics.Item2.X, spawnSpecifics.Item2.Y); _game.GetMap().SetMinionStats(this); // Let the map decide how strong this minion has to be. string minionModel = ""; if (spawnSpecifics.Item1 == 0) // If we're the blue side { minionModel += "Blue_Minion_"; // make it a blue minion } else { minionModel += "Red_Minion_"; // otherwise make it a red minion } // Finish model name with type if (type == MinionSpawnType.MINION_TYPE_MELEE) { minionModel += "Basic"; } else if (type == MinionSpawnType.MINION_TYPE_CASTER) { minionModel += "Wizard"; } else { minionModel += "MechCannon"; } // Set model setModel(minionModel); if (mainWaypoints.Count > 0) // If we have lane path instructions from the map { setWaypoints(new List <Vector2> { mainWaypoints[0], mainWaypoints[1] }); // Follow these instructions } else { setWaypoints(new List <Vector2> { new Vector2(x, y), new Vector2(x, y) }); // Otherwise path to own position. (Stand still) } setMoveOrder(MoveOrder.MOVE_ORDER_ATTACKMOVE); }
public LaneMinion( Game game, MinionSpawnType spawnType, string position, List <Vector2> mainWaypoints, uint netId = 0 ) : base(game, null, 0, 0, "", "", 1100, netId) { IsLaneMinion = true; MinionSpawnType = spawnType; BarracksName = position; _mainWaypoints = mainWaypoints; _curMainWaypoint = 0; _aiPaused = false; var spawnSpecifics = _game.Map.MapProperties.GetMinionSpawnPosition(BarracksName); SetTeam(spawnSpecifics.Item1); SetPosition(spawnSpecifics.Item2.X, spawnSpecifics.Item2.Y); _game.Map.MapProperties.SetMinionStats(this); // Let the map decide how strong this minion has to be. // Set model Model = _game.Map.MapProperties.GetMinionModel(spawnSpecifics.Item1, spawnType); // Fix issues induced by having an empty model string CollisionRadius = _game.Config.ContentManager.GetCharData(Model).PathfindingCollisionRadius; // If we have lane path instructions from the map if (mainWaypoints.Count > 0) { // Follow these instructions SetWaypoints(new List <Vector2> { mainWaypoints[0], mainWaypoints[1] }); } else { // Otherwise path to own position. (Stand still) SetWaypoints(new List <Vector2> { new Vector2(X, Y), new Vector2(X, Y) }); } MoveOrder = MoveOrder.MOVE_ORDER_ATTACKMOVE; Replication = new ReplicationLaneMinion(this); }
public Minion( MinionSpawnType type, MinionSpawnPosition position, List <Vector2> mainWaypoints, uint netId = 0 ) : base("", new MinionStats(), 40, 0, 0, 1100, netId) { minionType = type; SpawnPosition = position; this.mainWaypoints = mainWaypoints; curMainWaypoint = 0; _AIPaused = false; var spawnSpecifics = _game.Map.MapGameScript.GetMinionSpawnPosition(SpawnPosition); SetTeam(spawnSpecifics.Item1); setPosition(spawnSpecifics.Item2.X, spawnSpecifics.Item2.Y); _game.Map.MapGameScript.SetMinionStats(this); // Let the map decide how strong this minion has to be. // Set model Model = _game.Map.MapGameScript.GetMinionModel(spawnSpecifics.Item1, type); // Fix issues induced by having an empty model string CollisionRadius = _game.Config.ContentManager.GetCharData(Model).PathfindingCollisionRadius; // If we have lane path instructions from the map if (mainWaypoints.Count > 0) { // Follow these instructions SetWaypoints(new List <Vector2> { mainWaypoints[0], mainWaypoints[1] }); } else { // Otherwise path to own position. (Stand still) SetWaypoints(new List <Vector2> { new Vector2(X, Y), new Vector2(X, Y) }); } MoveOrder = MoveOrder.MOVE_ORDER_ATTACKMOVE; }
public Minion(Map map, int id, MinionSpawnType type, MinionSpawnPosition position, List<Vector2> mainWaypoints) : base(map, id, "", new MinionStats(), 40, 0, 0, 1100) { this.type = type; this.spawnPosition = position; this.mainWaypoints = mainWaypoints; this.curMainWaypoint = 0; var spawnSpecifics = map.getMinionSpawnPosition(spawnPosition); setTeam(Convert.toTeamId(spawnSpecifics.Item1)); setPosition(spawnSpecifics.Item2.X, spawnSpecifics.Item2.Y); map.setMinionStats(this); // Let the map decide how strong this minion has to be. string minionModel = ""; if (spawnSpecifics.Item1 == 0) // If we're the blue side minionModel += "Blue_Minion_"; // make it a blue minion else minionModel += "Red_Minion_"; // otherwise make it a red minion // Finish model name with type if (type == MinionSpawnType.MINION_TYPE_MELEE) minionModel += "Basic"; else if (type == MinionSpawnType.MINION_TYPE_CASTER) minionModel += "Wizard"; else minionModel += "MechCannon"; // Set model setModel(minionModel); if (mainWaypoints.Count > 0) // If we have lane path instructions from the map setWaypoints(new List<Vector2> { mainWaypoints[0], mainWaypoints[1] }); // Follow these instructions else setWaypoints(new List<Vector2> { new Vector2(x, y), new Vector2(x, y) }); // Otherwise path to own position. (Stand still) setMoveOrder(MoveOrder.MOVE_ORDER_ATTACKMOVE); }
public string GetMinionModel(TeamId team, MinionSpawnType type) { var teamDictionary = new Dictionary <TeamId, string> { { TeamId.TEAM_BLUE, "Blue" }, { TeamId.TEAM_PURPLE, "Red" } }; var typeDictionary = new Dictionary <MinionSpawnType, string> { { MinionSpawnType.MINION_TYPE_MELEE, "Basic" }, { MinionSpawnType.MINION_TYPE_CASTER, "Wizard" }, { MinionSpawnType.MINION_TYPE_CANNON, "MechCannon" }, { MinionSpawnType.MINION_TYPE_SUPER, "MechMelee" } }; if (!teamDictionary.ContainsKey(team) || !typeDictionary.ContainsKey(type)) { return(string.Empty); } return($"{teamDictionary[team]}_Minion_{typeDictionary[type]}"); }
public Minion( MinionSpawnType type, MinionSpawnPosition position, List <Vector2> mainWaypoints, uint netId = 0 ) : base("", new MinionStats(), 40, 0, 0, 1100, netId) { minionType = type; SpawnPosition = position; this.mainWaypoints = mainWaypoints; curMainWaypoint = 0; _AIPaused = false; var spawnSpecifics = _game.Map.GetMinionSpawnPosition(SpawnPosition); SetTeam(spawnSpecifics.Item1); setPosition(spawnSpecifics.Item2.X, spawnSpecifics.Item2.Y); _game.Map.SetMinionStats(this); // Let the map decide how strong this minion has to be. var minionModel = ""; if (spawnSpecifics.Item1 == Enet.TeamId.TEAM_BLUE) // If we're the blue side { minionModel += "Blue_Minion_"; // make it a blue minion } else { minionModel += "Red_Minion_"; // otherwise make it a red minion } // Finish model name with type if (type == MinionSpawnType.MINION_TYPE_MELEE) { minionModel += "Basic"; } else if (type == MinionSpawnType.MINION_TYPE_CASTER) { minionModel += "Wizard"; } else if (type == MinionSpawnType.MINION_TYPE_CANNON) { minionModel += "MechCannon"; } else { minionModel += "MechMelee"; } // Set model Model = minionModel; // If we have lane path instructions from the map if (mainWaypoints.Count > 0) { // Follow these instructions SetWaypoints(new List <Vector2> { mainWaypoints[0], mainWaypoints[1] }); } else { // Otherwise path to own position. (Stand still) SetWaypoints(new List <Vector2> { new Vector2(X, Y), new Vector2(X, Y) }); } MoveOrder = MoveOrder.MOVE_ORDER_ATTACKMOVE; }
public Minion(Map map, int id, MinionSpawnType type, MinionSpawnPosition position) : this(map, id, type, position, new List <Vector2>()) { }
public Minion(Game game, uint id, MinionSpawnType type, MinionSpawnPosition position) : this(game, id, type, position, new List <Vector2>()) { }
public Minion(Map map, int id, MinionSpawnType type, MinionSpawnPosition position) : this(map, id, type, position, new List<Vector2>()) { }