Ejemplo n.º 1
0
    public void Init(InteractionPointEditor point)
    {
        point.panel.SetActive(false);
        SetInteractionPointTag(point.point, point.tagId);
        interactionType.sprite = InteractionTypeSprites.GetSprite(point.type);

        mandatory.enabled = point.mandatory;
    }
Ejemplo n.º 2
0
    public void Init(InteractionPointPlayer point)
    {
        point.point.transform.LookAt(Vector3.zero, Vector3.up);
        point.point.transform.RotateAround(point.point.transform.position, point.point.transform.up, 180);

        //NOTE(Simon): Add a sprite to interaction points, indicating InteractionType
        interactionType.sprite = InteractionTypeSprites.GetSprite(point.type);
        ping.SetActive(false);
        point.panel.SetActive(false);

        mandatory.enabled = point.mandatory;

        SetInteractionPointTag(point.point, point.tagId);
    }
Ejemplo n.º 3
0
    private void Start()
    {
        Assert.IsTrue(Instance == null, "There are two isntances of this script. Only one is allowed");
        Instance = this;

        sprites.Clear();

        sprites.Add(InteractionType.None, null);
        sprites.Add(InteractionType.Text, text);
        sprites.Add(InteractionType.Image, image);
        sprites.Add(InteractionType.Video, video);
        sprites.Add(InteractionType.MultipleChoice, multipleChoice);
        sprites.Add(InteractionType.Audio, audio);
        sprites.Add(InteractionType.FindArea, findArea);
        sprites.Add(InteractionType.MultipleChoiceArea, multipleChoiceArea);
        sprites.Add(InteractionType.MultipleChoiceImage, multipleChoiceImage);
        sprites.Add(InteractionType.TabularData, tabularData);
        sprites.Add(InteractionType.Chapter, chapter);

        Assert.IsTrue(sprites.Count == Enum.GetValues(typeof(InteractionType)).Length, "You forgot to add the interaction sprite here");
    }
Ejemplo n.º 4
0
    private void AddInteractionPoint(InteractionPointPlayer point)
    {
        point.point.transform.LookAt(Vector3.zero, Vector3.up);
        point.point.transform.RotateAround(point.point.transform.position, point.point.transform.up, 180);

        //NOTE(Simon): Add a sprite to interaction points, indicating InteractionType
        point.point.GetComponentInChildren <SpriteRenderer>(excludeSelf: true).sprite = InteractionTypeSprites.GetSprite(point.type);
        point.point.transform.GetChild(0).gameObject.SetActive(true);
        point.panel.SetActive(false);
        interactionPoints.Add(point);

        SetInteractionPointTag(point);
    }