void Start() { mainCamera = GameObject.Find("Main Camera").GetComponent <Camera>(); controller = GameObject.Find("WSController").GetComponent <WSController>(); transform.FindChild("TypeSprite").GetComponent <SpriteRenderer>().sprite = typeSprite; transform.FindChild("TypeSpriteBorder").GetComponent <SpriteRenderer>().sprite = typeSpriteBorder; }
// Use this for initialization void Start() { controller = GameObject.Find("WSController").GetComponent <WSController>(); uiHandler = controller.GetComponent <WSUIHandler>(); unitOrWeapon = transform.FindChild("UnitOrWeapon").GetComponent <SpriteRenderer>(); unitOrWeaponBorder = transform.FindChild("UnitOrWeaponBorder").GetComponent <SpriteRenderer>(); }
public void Initialize() { wsController = GetComponent <WSController>(); cameraHandler = GetComponent <CameraHandler>(); inputEnabled = true; cameraHandler.Initialize(wsController.HexGrid.Values .Select(s => new Vector2(s.transform.position.x, s.transform.position.y)).ToList(), new Vector2(0, 0), new Vector2(1, .8f)); }