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); }
void UnspawnSword() { if (sword == null) { return; } Debug.Log("UNspawning sword!"); Destroy(sword.gameObject); sword = null; }
public bool OnSwordDone(BlacksmithSword sword) { numberOfCompletedSwords++; if (numberOfCompletedSwords == 3) { CompletedMinigame(); return(true); } else { return(false); } }