Skip to content
Snippets Groups Projects
Select Git revision
  • 6fe7a0ad17b002809c05a0c3b5812146978d277e
  • master default
  • JS-based-scroll-rendering
  • Paul_Marius_Level
  • Paul_Marius_2
  • Paul_Marius
  • Andi_Mark
  • be-UnityWebView
  • gitignoreFrameitServer
  • ZimmerBSc
  • Bugfix_StageLoading
  • stages
  • MAZIFAU_Experimental
  • tsc/coneworld
  • tsc/fact-interaction
  • marcel
  • MaZiFAU_TopSort
  • mergeHelper
  • zwischenSpeichern
  • tempAndrToMaster
  • SebBranch
  • 3.0
  • v2.1
  • v2.0
  • v1.0
25 results

AngleObject.cs

Blame
  • AngleObject.cs 973 B
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using TMPro;
        [CreateAssetMenu(fileName = "new DefaultObject", menuName = "Inventory System/Items/Angle")]
    public class AngleObject : ItemObject
    {
        public string pointA;
        public string pointB;
        public string pointC;
        public double angle;
    
        public void Awake()
        {
           type = ItemType.AngleFact;
        }
        //prefab should be "AngleDisplay"
        public override  GameObject CreateDisplay(Transform transform, GameObject prefab){
            var obj = Instantiate(prefab, Vector3.zero, Quaternion.identity, transform);
            obj.transform.GetChild(0).gameObject.GetComponent<TextMeshProUGUI>().text = pointA;
            obj.transform.GetChild(1).gameObject.GetComponent<TextMeshProUGUI>().text = pointB;
            obj.transform.GetChild(2).gameObject.GetComponent<TextMeshProUGUI>().text = pointC;
            obj.GetComponent<FactWrapper>().fact = this;
            return obj;
        }
    }