コード例 #1
0
 void SpawnSword()
 {
     Debug.Log("Spawning sword!");
     DebugUtilities.Assert(sword == null, "You already have a sword, can not spawn a new one");
     sword = SpawnTool(swordPrefab.gameObject, swordTransformInHand).GetComponentInChildren <BlacksmithSword>();
     SetSwordHandPosition(swordHandPosition);
 }
コード例 #2
0
 void UnspawnSword()
 {
     if (sword == null)
     {
         return;
     }
     Debug.Log("UNspawning sword!");
     Destroy(sword.gameObject);
     sword = null;
 }
コード例 #3
0
 public bool OnSwordDone(BlacksmithSword sword)
 {
     numberOfCompletedSwords++;
     if (numberOfCompletedSwords == 3)
     {
         CompletedMinigame();
         return(true);
     }
     else
     {
         return(false);
     }
 }