public MainSceneController() { this.configs = new Configs(); this.models = new Models(); this.resources = new ResourceMgr(this.configs); this.uiFrame = new UIFrameRenderer(this.configs, this.models, this.resources); this.frisbeeFactory = new FrisbeeFactory(this.configs, this.models, this.resources); this.randGen = new System.Random(); }
public FrisbeeRenderer(Configs configs, FrisbeeFactory factory, Models models, IMoveStrategy move, ResourceMgr resources) { this.GameObj = GameObject.Instantiate( resources.frisbeePrefab, configs.DefaultFrisbeePos, Quaternion.Euler(0, 0, 0) ); this.localController = this.GameObj.AddComponent <FrisbeeController>(); this.localController.Inject(this, factory, models); this.Move = move; }
public void Inject(FrisbeeRenderer renderer, FrisbeeFactory factory, Models models) { this.renderer = renderer; this.factory = factory; this.models = models; }