Exemple #1
0
 public WorldMarker(Vector3 localPosition, bool isWaypoint, string name, MapMarkers type = MapMarkers.X)
 {
     this.Type          = type;
     this.LocalPosition = localPosition;
     this.IsWaypoint    = isWaypoint;
     this.Name          = name;
 }
Exemple #2
0
        private void IncrementCount()
        {
            this.currentCount++;
            var newMarker = new Marker {
                Description = $"This is a PWA POC" + this.currentCount, ShowPopup = false, X = BaseMarker.X + 0.001 * this.currentCount, Y = BaseMarker.Y + 0.001 * this.currentCount
            };

            MapMarkers.Add(newMarker);
            vueMessage.IncrementText(currentCount);
        }
Exemple #3
0
 protected Character(Position position, MapMarkers mapMarker, string name, Race race, CharClass charClass, bool isPlayer)
     : base(position, mapMarker, name)
 {
     this.isPlayer  = isPlayer;
     this.Race      = race;
     this.CharClass = charClass;
     this.SetInitialStats(this.Race, this.CharClass, this.isPlayer);
     this.PassiveSkills = new List <PassiveSkill>();
     this.Inventory     = new List <Item>();
 }
Exemple #4
0
 protected Character(Position position, MapMarkers mapMarker, string name, Race race, CharClass charClass, bool isPlayer)
     : base(position, mapMarker, name)
 {
     this.isPlayer = isPlayer;
     this.Race = race;
     this.CharClass = charClass;
     this.SetInitialStats(this.Race, this.CharClass, this.isPlayer);
     this.PassiveSkills = new List<PassiveSkill>();
     this.Inventory = new List<Item>();
 }
Exemple #5
0
    private static Sprite GetSpriteByEnum(MapMarkers type)
    {
        for (int i = 0; i < _singleton._mapMakerDropDownSetupList.Count; i++)
        {
            if (_singleton._mapMakerDropDownSetupList[i]._type == type)
            {
                return(_singleton._mapMakerDropDownSetupList[i]._sprite);
            }
        }

        return(_singleton._mapMakerDropDownSetupList[0]._sprite);
    }
Exemple #6
0
        protected override async Task OnInitializedAsync( )
        {
            Employee = await EmployeeDataService.GetEmployeeDetails(int.Parse(EmployeeID));

            MapMarkers.Add(new Marker
            {
                Description = $"{Employee.FirstName} {Employee.LastName}",
                ShowPopup   = false,
                X           = Employee.Longitude,
                Y           = Employee.Latitude
            }
                           );
            await base.OnInitializedAsync( );
        }
    public void Setup(MapMarkers type, string name, float size)
    {
        _inputField.text = name;

        if (_animator == null)
        {
            _doAnimationOnAwake = true;
            _trigger            = type.ToString();
        }
        else
        {
            _animator.SetTrigger(type.ToString());
        }

        _image.raycastTarget = true;
        GetComponent <RectTransform>().sizeDelta = new Vector2(size, size);
    }
Exemple #8
0
    private static void AddWaypoint(Vector3 position, string name, MapMarkers type)
    {
        //Scale
        float   scale         = 1 / _singleton._pivotSpawnContainer.localScale.x * _singleton._waypointSize;
        Vector3 waypointScale = new Vector3(scale, scale, scale);

        GameObject newWaypoint = Instantiate(_singleton._waypointPrefab, Vector3.zero, Quaternion.identity, _singleton._waypointContainer);

        newWaypoint.transform.localPosition = position;
        newWaypoint.transform.localScale    = waypointScale;

        WaypointMarker script = newWaypoint.GetComponent <WaypointMarker>();

        script.Setup(type, name, _singleton._waypointSize);

        _worldMarkers.Add(position, new WorldMarker(position, true, WaypointMarker.STANDARD_WAYPOINT_NAME, type));

        _spawnedWaypoints.Add(newWaypoint.transform);
    }
Exemple #9
0
 protected GameObject(Position position, MapMarkers mapMarker, string name)
 {
     this.Position = position;
     this.MapMarker = mapMarker;
     this.Name = name;
 }
Exemple #10
0
        internal void InitBaseData(Arma3TacMapLibrary.TacMaps.IApiTacMaps apiTacMaps, Arma3TacMapLibrary.Arma3.IMapInfosService mapInfosService)
        {
            if (!Factions.Any())
            {
                Factions.Add(new Faction()
                {
                    Name = "OTAN", UsualSide = GameSide.BLUFOR, Flag = "/img/flags/nato.png", GameMarker = GameMarkerType.flag_nato
                });
                Factions.Add(new Faction()
                {
                    Name = "CSAT", UsualSide = GameSide.OPFOR, Flag = "/img/flags/csat.png", GameMarker = GameMarkerType.flag_csat
                });
                Factions.Add(new Faction()
                {
                    Name = "AAF", UsualSide = GameSide.Independant, Flag = "/img/flags/aaf.png", GameMarker = GameMarkerType.flag_aaf
                });
                Factions.Add(new Faction()
                {
                    Name = "USA", UsualSide = GameSide.BLUFOR, Flag = "/img/flags/us.png", GameMarker = GameMarkerType.flag_usa
                });
                Factions.Add(new Faction()
                {
                    Name = "UK", UsualSide = GameSide.BLUFOR, Flag = "/img/flags/uk.png", GameMarker = GameMarkerType.flag_uk
                });
                Factions.Add(new Faction()
                {
                    Name = "FIA", UsualSide = GameSide.Independant, Flag = "/img/flags/fia.png", GameMarker = GameMarkerType.flag_fia
                });
                Factions.Add(new Faction()
                {
                    Name = "France", UsualSide = GameSide.BLUFOR, Flag = "/img/flags/fr.png", GameMarker = GameMarkerType.flag_france
                });
                SaveChanges();
            }
            var oldMissionBrief = Matchs.Where(m => !string.IsNullOrEmpty(m.MissionBriefLink)).ToList();

            if (oldMissionBrief.Any())
            {
                foreach (var match in oldMissionBrief)
                {
                    Documents.Add(new Document()
                    {
                        Date = DateTime.Now, MatchID = match.MatchID, Link = match.MissionBriefLink, Type = DocumentType.MissionBrief, Title = "Mission brief"
                    });
                    match.MissionBriefLink = null;
                    Update(match);
                }
                SaveChanges();
            }
            var oldMaps = Matchs.Where(m => m.GameMapID != null && m.TacMapId == null).Include(m => m.GameMap).ToList();

            if (oldMaps.Any())
            {
                var worlds = mapInfosService.GetMapsInfos().Result;
                foreach (var match in oldMaps)
                {
                    var world = worlds.FirstOrDefault(w => string.Equals(w.worldName, match.GameMap.WebMap, StringComparison.OrdinalIgnoreCase)) ??
                                worlds.FirstOrDefault(w => w.worldName.EndsWith(match.GameMap.WebMap, StringComparison.OrdinalIgnoreCase)) ??
                                worlds.FirstOrDefault(w => w.worldName.StartsWith(match.GameMap.WebMap, StringComparison.OrdinalIgnoreCase));
                    if (world != null)
                    {
                        match.WorldName = world.worldName;
                        match.TacMapId  = apiTacMaps.Create(new Arma3TacMapLibrary.TacMaps.ApiTacMapCreate()
                        {
                            WorldName = world.worldName,
                            Label     = match.Name,
                            EventHref = new Uri("https://plan-ops.fr/Events/Details/" + match.MatchID),
                            Markers   = MapMarkers.Where(m => m.MatchID == match.MatchID && m.RoundSideID == null && m.RoundSquadID == null).Select(m => new Arma3TacMapLibrary.Maps.StoredMarker()
                            {
                                MarkerData = m.MarkerData
                            }).ToList()
                        }).Result.Id;
                        Update(match);
                    }
                }
                SaveChanges();
            }
        }
Exemple #11
0
 //If placing waypoint right now, this is the sprite to use
 public void UpdateCurrentWaypoint()
 {
     _currentSelectedWaypoint = (MapMarkers)_waypointsDropdown.value;
 }
Exemple #12
0
 protected GameObject(Position position, MapMarkers mapMarker, string name)
 {
     this.Position  = position;
     this.MapMarker = mapMarker;
     this.Name      = name;
 }