private void Awake() { GameObject reticle = Instantiate(reticlePrefab) as GameObject; m_reticle = reticle.GetComponent <TargetingReticle>(); reticle.transform.parent = null; m_reticleWorldPosition = transform.position + transform.forward; reticle.transform.position = m_reticleWorldPosition; }
public UIRenderingService(Internal.Model.World world, LocalPlayerService localPlayerService, UserInputProcessingService inputSim) { this.world = world; this.localPlayerState = localPlayerService.Player; this.inputSim = inputSim; reticle = new TargetingReticle(); textarea = new Textarea(); textarea.Position = new Vector2(TW.Graphics.Form.Form.ClientSize.Width - 120, 20); textarea.Size = new Vector2(100, 50); debugTextarea = new Textarea(); debugTextarea.Position = new Vector2(TW.Graphics.Form.Form.ClientSize.Width - 200, 150); debugTextarea.Size = new Vector2(180, 400); }