コード例 #1
0
        protected virtual void Start()
        {
            //set MGMT
            MGMT = GameObject.FindWithTag("MGMT").GetComponent <MGMT>();

            // Creating a transmitter.
            _transmitter = gameObject.AddComponent <OSCTransmitter>();

            // Set remote host address.
            _transmitter.RemoteHost = "127.0.0.1";

            // Set remote port;
            _transmitter.RemotePort = TransmitPort;


            // Creating a receiver.
            _receiver = gameObject.AddComponent <OSCReceiver>();

            // Set local port.
            _receiver.LocalPort = ReceivePort;

            // Bind "MessageReceived" method to special address.
            _receiver.Bind(_oscAddress, MessageReceived);
            //connect to EffectMaster, which CompressReadouts
            //assumes to find on this gameobject.
            effectsMaster = GetComponent <EffectsMaster>();

            //Set Memory and Smoothing vars
            AFvals     = new double[memory][];
            Tvals      = new double[memory][];
            weightVals = new double[memory];
            means      = new double[4];
            std_devs   = new double[4];
            history    = new double[history_size][];


            for (int i = 0; i < memory; i++)
            {
                AFvals[i] = new double[2];
                Tvals[i]  = new double[2];
                for (int j = 0; j < 2; j++)
                {
                    AFvals[i][j] = -1;
                    Tvals[i][j]  = -1;
                }

                weightVals[i] = (double)Mathf.Pow((float)weightRatio, (float)((memory - 1) - i));
                weightsum    += weightVals[i];
            }
            for (int i = 0; i < history_size; i++)
            {
                history[i] = new double[4];
                for (int j = 0; j < 4; j++)
                {
                    history[i][j] = 0;
                }
            }
            //instantiate int array
            smoothedMerged = new float[50];
        }
コード例 #2
0
        public MainForm()
        {
            InitializeComponent();

            rosterFileLoaderThread.DoWork += new DoWorkEventHandler(rosterFileLoaderThread_DoWork);

            this.Text = TITLE_STRING + " - v" + MaddenEditor.Core.Version.VersionString;

            tabControl.Visible = false;
            Tools.Visible      = false;
            franchiseToolStripMenuItem.Visible = false;
            statusStrip.Visible             = false;
            exportToolStripMenuItem.Enabled = false;

            isInitialising = false;

            manager = new MGMT();

            if (!manager.config.Read())
            {
                manager.config         = new AmpConfig();
                manager.config.changed = true;
            }
            if (!manager.config.SkipSplash)
            {
                Revisions form = new Revisions();
                form.manager = manager;
                form.InitUI();
                form.Show();
                form.TopMost = true;
            }
        }
コード例 #3
0
        public DatConfigForm(MGMT man, EditorModel em)
        {
            InitializeComponent();
            this.manager = man;
            this.model   = em;

            PlayerRepo = new repository();

            Init();
            isInitializing = false;
        }
コード例 #4
0
    //Below is intro logic.
    //-------------------------------
    void Awake()
    {       //center by force. For later, consider whether there is anything preventing this from working when not at origin.
        gameObject.transform.position = Vector3.zero;
        PrepareLR();
        //when the SO is implemented, reference data from SO

        /*
         * reflections = lineParams.Reflections;
         * sections = lineParams.Sections;
         */
        reflIndex    = transform.GetSiblingIndex();
        mgmtScript   = GameObject.FindWithTag("MGMT").GetComponent <MGMT>();
        _branchChild = mgmtScript.Prefabs._BranchLR;
    }
コード例 #5
0
    void Awake()
    {       //center by force. For later, consider whether there is anything preventing this from working when not at origin.
        gameObject.transform.position = Vector3.zero;

        //set reference to singleton.
        MGMT = GameObject.FindGameObjectWithTag("MGMT").GetComponent <MGMT>();

        //set reference to MandalaParameters
        lineParams = MGMT.MandalaParams;
        ImportLineParams();

        //put on object with a lineRenderer
        //prepare lineRend to carry the points
        sourceLine = GetComponent <LineRenderer>();
        sourceLine.SetPosition(0, transform.position);
        sourceLine.positionCount     = numPointsPerLine;
        sourceLine.numCapVertices    = 3;
        sourceLine.numCornerVertices = 3;

        PickColorSwatch();

        branchStartPoints = new Vector3[NumBranchesPerTrunk];
    }