Ejemplo n.º 1
0
    public void AssociateGOToRobot(GameObject GO, Cellulo robot)
    {
        print("Associating GO " + GO.name + " to robot ID" + robot.getID());
        CelluloIndexEntry myEntry = GetEntry(robot);

        myEntry.AssociatedGO = GO;
    }
Ejemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     while (true)
     {
         if (CelluloInPool.Count == Cellulo.totalRobots())
         {
             break;
         }
         CelluloIndexEntry newEntry = new CelluloIndexEntry();
         print("Adding new CelluloTrackerEntry : \n robot ID=  " + newEntry.Id);
         CelluloInPool.Add(newEntry);
     }
     foreach (CelluloIndexEntry Entry in CelluloInPool)
     {
         //print("List Entry robot ID :"+ Entry.Id+ "\n has associated GO :"+Entry.AssociatedGO);
     }
 }
Ejemplo n.º 3
0
    public CelluloIndexEntry GetEntry(Cellulo robot)
    {
        CelluloIndexEntry EntryToReturn = CelluloInPool.Find(x => x.Id.Equals(robot.getID()));

        return(EntryToReturn);
    }
Ejemplo n.º 4
0
    public CelluloIndexEntry GetEntry(GameObject GO)
    {
        CelluloIndexEntry EntryToReturn = CelluloInPool.Find(x => x.AssociatedGO.Equals(GO));

        return(EntryToReturn);
    }