public UnitManagerEntity(RootEntity root) : base(root) { foreach (UnitType type in Enum.GetValues(typeof(UnitType))) { unitEntities.Add(type, new Dictionary <int, UnitEntity>()); } }
public VisionComponent(Team team, RootEntity root) : base(root) { foreach (Team t in Enum.GetValues(typeof(Team))) { visions.Add(t, t == team); } }
public UnitEntity(Team team, Body body, float angle, RootEntity root) : base(root) { Team = team; AddComponent(new BodyComponent(body, angle, root)); AddComponent(new VisionComponent(team, root)); }
public DynamicBodyUnitEntity(Team team, DynamicBody body, float angle, RootEntity root) : base(team, body, angle, root) { AnimationComponent animation = new AnimationComponent(root); GetComponent <BodyComponent>().SetAnimationComponent(animation); AddComponent(animation); }
public VisionManagerEntity(CollisionEntity collision, float visionRadius, RootEntity root) : base(root) { this.collision = collision; this.visionRadius = visionRadius; foreach (Team team in Enum.GetValues(typeof(Team))) { units.Add(team, new Dictionary <Body, UnitEntity>()); } }
public NetworkEntity(ClientManagerEntity clientManager, ushort port, RootEntity root) : base(root) { this.clientManager = clientManager; server = new ServerNetwork(); server.Listen(port, 100); server.SetMessageHandler(MessageType.Connect, ConnectHandler); server.SetMessageHandler(MessageType.Disconnect, DisconnectHandler); server.SetMessageHandler(MessageType.Timeout, TimeoutHandler); server.SetMessageHandler(MessageType.Move, MoveHandler); }
public ClientManagerEntity(RootEntity root) : base(root) { }
public CollisionEntity(RootEntity root) : base(root) { }
public AnimationComponent(RootEntity root) : base(root) { SetLoopAnimation(AnimationType.Idle); }
public BodyComponent(Body body, float angle, RootEntity root) : base(root) { Body = body; Angle = angle; }
public PathfindingEntity(RootEntity root) : base(root) { }
public ConfigEntity(RootEntity root) : base(root) { config = new ConfigReader(path); }
public ChampionEntity(uint peerID, Team team, DynamicBody body, float angle, RootEntity root) : base(team, body, angle, root) { PeerID = peerID; }
public FactoryEntity(RootEntity root) : base(root) { }