Exemplo n.º 1
0
    public void activate(Vector3 pos, Vector3 dir)
    {
        float dist = 0.0f;

        if (accordianType == AccordianActionType.SUBNETS)
        {
            if (!submap1 || !submap2 || !submap3)
            {
                submap1 = subnet1.GetComponent <SubnetMapping>();
                submap2 = subnet2.GetComponent <SubnetMapping>();
                submap3 = subnet3.GetComponent <SubnetMapping>();
            }

            dist = submap1.currLayerDist;
        }
        else if (accordianType == AccordianActionType.TIMELINE)
        {
            if (!timelineScript)
            {
                timelineScript = timeline.GetComponent <TimelineScript>();
            }
            dist = timelineScript.getCurrentOffset();
        }

        gameObject.SetActive(true);
        gameObject.transform.forward  = dir;
        gameObject.transform.position = pos + dir * dist * 2.0f;
        updateSubLayerReps(dist);
    }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        submap1 = subnet1.GetComponent <SubnetMapping>();
        submap2 = subnet2.GetComponent <SubnetMapping>();
        submap3 = subnet3.GetComponent <SubnetMapping>();

        timelineScript = timeline.GetComponent <TimelineScript>();
    }