Example #1
0
 //story
 public void AddStoryCampByLabel(object sender, LabelMgr.Args arg)
 {
     if (arg.add == true)
     {
         StaticPoint sp = arg.label as StaticPoint;
         if (sp != null)
         {
             if (sp.campId <= 0)
             {
                 return;
             }
             int campId = sp.campId;
             if (!CampTradeIdData.IsStoryDetectTradeCamp(campId))
             {
                 return;
             }
             Vector3 pos  = sp.position;
             Camp    camp = Camp.GetCamp(campId);
             if (camp == null)
             {
                 return;
             }
             DetectedTown dt = new DetectedTown(pos, camp.Name, campId);
             DTownsDict.Add(dt.PosCenter, dt);
             if (AddDetectedTownListener != null)
             {
                 AddDetectedTownListener(dt.PosCenter);
             }
         }
     }
 }
Example #2
0
        public void constructLatticeLand()
        {
            for (int i = 0; i < size; i++)
            {
                for (int j = 0; j < size; j++)
                {
                    for (int k = 0; k < size; k++)
                    {
                        StaticPoint curr = GeoObjConstruction.sPoint(scaleFactor * ((i - (size / 2)) * basisSystem[0] + j * basisSystem[1] + (k - (size / 2)) * basisSystem[2]) + translation);
                        curr.transform.SetParent(transform);
                        //curr.GetComponent<InteractionBehaviour>().enabled = false;

                        curr.GetComponent <MasterGeoObj>().allowDelete = false;
                    }
                }
            }
        }