public static WanderingStrategy CreateComponent(GameObject where, float moveDistance = 1f, float moveProbability = 0.25f, float idleTime = 2f) { WanderingStrategy strategy = where.AddComponent <WanderingStrategy>(); strategy.moveDistance = moveDistance; strategy.moveProbability = moveProbability; strategy.idleTime = idleTime; strategy.Start(); return(strategy); }