private SpawnEntityData CreateCharacter(PlayerType owner, OperativeType operative, Weapon weapon, Point point) { var spawn = new SpawnEntityData(); var maxHealth = 1; var mapType = owner == PlayerType.Player1 ? OnMapType.Player1 : OnMapType.Player2; spawn.PrefabName = "CharacterBase"; spawn.InitialComponents.Add(new OperativeInfoComponent(owner, operative)); spawn.InitialComponents.Add(new MovementComponent(point, mapType)); spawn.InitialComponents.Add(new ShootComponent(weapon)); spawn.InitialComponents.Add(new HealthComponent(maxHealth)); spawn.InitialComponents.Add(new CharacterActionComponent()); spawn.InitialComponents.Add(new GrenadeThrowComponent()); return(spawn); }
public OperativeInfoComponent(PlayerType owner, OperativeType operativeType) { Owner = owner; OperativeType = operativeType; }