private void Awake() { GameServices.Initialize(); InitializeMainComponents(); players = Player.Builder.Build(new string[] { "First guy", "Second guy" }, new int[][] { new int[] { 1 }, new int[] { 0 } }, null); var container = new FigureContainer(); figureFactory = new FigureFactory(container); TurnController.Initialize(container); }
public virtual void Initialize(FigureContainer container, FigureData data) { this.container = container; jumpUpHeight = data.jumpUpHeight; jumpDownHeight = data.jumpDownHeight; angle = data.jumpingAngle * Mathf.Deg2Rad; pathFinder = new DijkstraPathFinder(jumpUpHeight, jumpDownHeight); body = GetComponent<Rigidbody>(); Height = r.bounds.size.y; DefineStartHex(0.5f * r.bounds.size.y); container.OnFigureCreated((Figure)this); }
private TurnController(FigureContainer container) { this.container = container; }
public static void Initialize(FigureContainer container) { instance = new TurnController(container); }
public FigureFactory(FigureContainer container) { this.container = container; I = this; }
public override void Initialize(FigureContainer container, FigureData data) { base.Initialize(container, data); Owner = Player.GetByIndex(data.owner); //*!Crutch r.material = Resources.Load<Material>("Models/Materials/whiteMat"); r.material.mainTexture = Resources.Load<Texture>("Models/whiteMat"); r.material.color = data.color; //_ InitStats(data); InitFight(); }