Beispiel #1
0
 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;
 }
Beispiel #2
0
    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);
    }