public static Guard Create(IGuardMovementStrategy mStrat, IGuardDetectStrategy dStrat) { GameObject newGuardObject = Instantiate(Guard._guardPrefab); Guard newGuard = newGuardObject.GetComponent<Guard>(); newGuard._guardMovementStrategy = mStrat; newGuard._guardDetectStrategy = dStrat; return newGuard; }
public static Guard Create(IGuardMovementStrategy mStrat, IGuardDetectStrategy dStrat) { GameObject newGuardObject = Instantiate(Guard._guardPrefab); Guard newGuard = newGuardObject.GetComponent <Guard>(); newGuard._guardMovementStrategy = mStrat; newGuard._guardDetectStrategy = dStrat; return(newGuard); }