public void Start()
 {
     piece       = transform.root.gameObject.GetComponent <KitPiece>();
     core        = FindObjectOfType(typeof(KitCore)) as KitCore;
     levelEditor = core.GetComponent <KitLevelWindow>();
     if (levelEditor == null)
     {
         enabled = false;
     }
     StartCoroutine(StartFirstLoad());
 }
Beispiel #2
0
 private void Start()
 {
     core  = FindObjectOfType(typeof(KitCore)) as KitCore;
     piece = GetComponent <KitPiece>();
     for (int i = 0; i < core.requiredPieces.Length; i++)
     {
         if (core.requiredPieces[i].piece.PieceName == piece.PieceName)
         {
             core.requiredPieces[i].Amount++;
             if (core.requiredPieces[i].Amount > core.requiredPieces[i].maxAmount)
             {
                 core.RemovePiece(piece);
             }
             break;
         }
     }
 }
 void Start()
 {
     core = GetComponent <KitCore>();
 }