コード例 #1
0
ファイル: FactSpawner.cs プロジェクト: SESch93/UFrameIT
    //private Camera camera;

    void Start()
    {
        AddFactEvent.AddListener(FactAction);
        RemoveFactEvent.AddListener(DeleteObject);

        AnimateNonExistingFactEvent.AddListener(animateNonExistingFactTrigger);

        //Default FactRepresenation = Sphere-Prefab for Points
        this.FactRepresentation = Sphere;

        //camera = Camera.main;
    }
コード例 #2
0
    //Start is called before the first frame update
    void Start()
    {
        prefabDictionary = new Dictionary <Type, GameObject>()
        {
            { typeof(PointFact), prefab_Point },
            { typeof(LineFact), prefab_Distance },
            { typeof(RayFact), prefab_Line },
            { typeof(AngleFact), prefab_Angle },
            { typeof(OnLineFact), prefab_OnLine }
        };

        var rect = GetComponent <RectTransform>();

        x_Start          = (int)(rect.rect.x + X_Pacece_Between_Items * .5f);
        y_Start          = (int)(-rect.rect.y - y_Pacece_Between_Items * .5f);//);
        number_of_Column = Mathf.Max(1, (int)(rect.rect.width / prefab_Point.GetComponent <RectTransform>().rect.width) - 1);

        AddFactEvent.AddListener(AddFact);
        RemoveFactEvent.AddListener(RemoveFact);
        AnimateExistingFactEvent.AddListener(AnimateFact);
    }