Beispiel #1
0
    // Make sure the correct transform is passed in
    public void FlipBits(FoundFlags _self, SmallWorldType _type)
    {
        //Debug.Log(_self.ToString() + " | " + _type.ToString());

        switch (_type)
        {
        case SmallWorldType.NEO:
            if (!UserFlagExtensions.HasFlagQuick(LocatedBits[1], _self))    // Make sure it's not already in there
            {
                LocatedBits[1] += (int)_self;
            }
            //Debug.Log(LocatedBits[1].ToString());
            break;

        case SmallWorldType.MAB:
            if (!UserFlagExtensions.HasFlagQuick(LocatedBits[2], _self))     // Make sure it's not already in there
            {
                LocatedBits[2] += (int)_self;
            }
            //Debug.Log(LocatedBits[2].ToString());
            break;

        case SmallWorldType.KB:
            if (!UserFlagExtensions.HasFlagQuick(LocatedBits[3], _self))     // Make sure it's not already in there
            {
                LocatedBits[3] += (int)_self;
            }
            //Debug.Log(LocatedBits[3].ToString());
            break;

        case SmallWorldType.Planet:
            if (!UserFlagExtensions.HasFlagQuick(LocatedBits[0], _self))     // Make sure it's not already in there
            {
                LocatedBits[0] += (int)_self;
            }
            //Debug.Log(LocatedBits[0].ToString());
            break;

        default:
            Debug.Log("BAD WORLD PASSED INTO FLIP FUNCTION!");
            break;
        }
    }
Beispiel #2
0
 // Use this method to load found worlds
 private void LoadUpWorlds(Transform _WorldSet, int _index)
 {
     foreach (Transform _child in _WorldSet)
     {
         //Debug.Log(_child.name);
         //Debug.Log(LocatedBits[_index]);
         if (_child.GetComponent <OrbitalMovement>() != null)
         {
             if (UserFlagExtensions.Contains(LocatedBits[_index], _child.GetComponent <OrbitalMovement>().MySaveFlag))
             {
                 //Debug.Log(_child.GetComponent<OrbitalMovement>().MySaveFlag.ToString() + " | " + LocatedBits[_index]);
                 Debug.Log(_child.name + " now loading");
                 _child.GetChild(3).GetComponent <SelectOrbitalObject>().AddOrbitalPath = true;
                 _child.GetChild(3).GetComponent <SelectOrbitalObject>().AddNamePlate   = true;
                 _child.GetChild(3).GetComponent <SelectOrbitalObject>().Studied        = true;
                 Capi.set(_child.name + ".CacheFound", _child.GetChild(3).GetComponent <SelectOrbitalObject>().Studied);
                 _child.GetChild(4).GetChild(1).GetComponent <UpdateTrophyCase>().FoundCache();
             }
         }
     }
 }