Ejemplo n.º 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;
 }
Ejemplo n.º 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);
    }