Esempio n. 1
0
 void SetUpGhostTarget([NotNull] int towerId)
 {
     //if (towerId == null)
     //{
     //    throw new ArgumentNullException("towerId");
     //}
     m_CurrentGhost = Instantiate <GameObject>(Resources.Load <GameObject>("Prefab/Game/Target_Ghost")).GetComponent <TargetGhost>();
     m_CurrentGhost.Initialize(towerId);
     m_CurrentGhost.Hide();
 }
Esempio n. 2
0
 public void CancelGhostPlacement(bool isRemoveSelectTarget = false)
 {
     if (!isBuilding)
     {
         throw new InvalidOperationException("Can't cancel out of ghost placement when not in the building state.");
     }
     Destroy(m_CurrentGhost.gameObject);
     m_CurrentGhost = null;
     SetState(State.Normal);
     DeselectTarget(isRemoveSelectTarget);
 }