Ejemplo n.º 1
0
        void Awake()
        {
            activation = this.GetComponent <Activation>();
            if (activation == null)
            {
                activation = this.gameObject.AddComponent <Activation>();
            }
            activation.SetModuleType(ModuleType.READING);

            df = this.GetComponent <DataField>();
            if (df == null)
            {
                df = this.gameObject.AddComponent <DataField>();
            }
            df.dataType = DataField.DataType.RAW;

            currentStep = 0;
            var modules = GameObject.FindGameObjectsWithTag("VisModule");

            for (int i = 0; i < modules.Length; i++)
            {
                if (modules[i].name == "Animator")
                {
                    animator = modules[i];
                    break;
                }
            }
//			animator = GameObject.Find("Animator");
            if (animator != null)
            {
                currentStep = animator.GetComponent <Animator>().currentStep;
            }
        }
Ejemplo n.º 2
0
        void Awake()
        {
            activation = this.GetComponent <Activation>();
            if (activation == null)
            {
                activation = this.gameObject.AddComponent <Activation>();
            }
            activation.SetModuleType(ModuleType.FILTERING);

            df = this.GetComponent <DataField>();
            if (df == null)
            {
                df = this.gameObject.AddComponent <DataField>();
            }
            df.dataType = DataField.DataType.FILTERED;

            var transform = GetComponent <Transform>();

            transform.hideFlags = HideFlags.HideInInspector;
        }
Ejemplo n.º 3
0
        void Awake()
        {
            activation = this.GetComponent <Activation>();
            if (activation == null)
            {
                activation = this.gameObject.AddComponent <Activation>();
            }
            activation.SetModuleType(ModuleType.MAPPING);

            if (this.GetComponent <MeshFilter>() == null)
            {
                this.gameObject.AddComponent <MeshFilter>();
            }
            if (this.GetComponent <MeshRenderer>() == null)
            {
                this.gameObject.AddComponent <MeshRenderer>();
            }

            var transform = GetComponent <Transform>();

            transform.hideFlags = HideFlags.HideInInspector;
        }