Example #1
0
        public KeyValuePair <string, int> GetNameTour()
        {
            KeyValuePair <string, int> retour;

            var q1 = Etapes.GroupBy(x => x.NameTour,
                                    (a, b) => new {
                Key      = a,
                Effectif = b.Where(y => y.isEnfant).Count()
            });

            string s = "";
            int    r = 0;

            if (q1.Any())
            {
                foreach (var item in q1)
                {
                    if (s != "")
                    {
                        s += "+";
                    }
                    s += item.Key;
                    r += item.Effectif;
                }
            }
            retour = new KeyValuePair <string, int>(s, r);
            return(retour);
        }
Example #2
0
 // Use this for initialization
 void Start()
 {
     player      = GameObject.FindWithTag("Player");
     Lumiere     = GetComponentInChildren <Light>();
     EtapeScript = player.GetComponent <Etapes> ();
     yeux        = GameObject.FindWithTag("Yeux");
     OeilScript  = yeux.GetComponent <OeilMouvement> ();
 }
Example #3
0
 public NewCourse(byte[] collection)
 {
     byte[] tempo = new byte[12];
     Jour             = new DateTime(BitConverter.ToInt64(collection, 0));  // 8
     Sens             = collection[8];                                      // 1
     Tournée          = collection[9];                                      // 1
     Départ           = new TimeSpan(BitConverter.ToInt64(collection, 10)); // 8
     Arrivée          = new TimeSpan(BitConverter.ToInt64(collection, 18)); // 8
     Effectif         = BitConverter.ToInt32(collection, 26);               // 4
     _PositionBuffeur = 30;
     while (_PositionBuffeur < collection.Length)
     {
         etape = new NewEtape(collection, _PositionBuffeur);
         Etapes.Add(etape);
         _PositionBuffeur += etape.lenght;
     }
     _Index += 1;
 }
Example #4
0
 public Course(byte[] collection)
 {
     //byte[] tempo = new byte[12];
     Jour             = new DateTime(BitConverter.ToInt64(collection, 0));
     Sens             = (EnumSens)collection[_posSens];
     Départ           = new TimeSpan(BitConverter.ToInt64(collection, _posDépart));
     Arrivée          = new TimeSpan(BitConverter.ToInt64(collection, _posArrivée));
     IdDépart         = BitConverter.ToInt32(collection, _posIdDépart);
     IdArrivée        = BitConverter.ToInt32(collection, _posIdArrivée);
     _PositionBuffeur = _lenghtHeader;
     while (_PositionBuffeur < collection.Length)
     {
         etape = new Etape(collection, _PositionBuffeur);
         Etapes.Add(etape);
         _PositionBuffeur += etape.lenght;
     }
     _Index += 1;
 }
Example #5
0
    public override void Init()
    {
        base.Init();

        GameManager.Instance.UpdateCameraPosition(GameManager.Instance.PrisonerInstance.CurrentTile);

        GameManager.Instance.PrisonerInstance.GetComponent <Behaviour.Escortable>().IsKidnappid = true;
        teamCrocketJames = SpawnTeamCrocketJames(new Vector3(1.0f, 0f, 0f) + GameManager.Instance.ActiveTile.transform.position);
        Etapes.Add(new Message(teamCrocketJames, "Grekhan"));
        teamCrocketJessie = SpawnTeamCrocketJessie(new Vector3(1.0f, 0f, 0f) + GameManager.Instance.ActiveTile.transform.position);
        Etapes.Add(new Message(teamCrocketJessie, "Swag"));

        Etapes = new List <Step>();
        Etapes.Add(new TutoManager.Spawn(teamCrocketJames, jumpAnimationClip));
        Etapes.Add(new TutoManager.Spawn(teamCrocketJessie, jumpAnimationClip));


        // Content
        Etapes.Add(new Message(teamCrocketJames, Translater.TutoText("seqTeamCrocket", 0)));
        Etapes.Add(new Message(teamCrocketJessie, Translater.TutoText("seqTeamCrocket", 1)));
        Etapes.Add(new Message(teamCrocketJames, Translater.TutoText("seqTeamCrocket", 2)));
    }