Esempio n. 1
0
    private string GenerateNeuronMasterInfo(int instanceIndex)
    {
        if (instanceIndex >= numOfInstances)
        {
            return(string.Empty);
        }

        NeuronAnimatorInstance instance = GetInstances()[instanceIndex];

        if (instance == null)
        {
            return(string.Empty);
        }

        string      line  = string.Empty;
        NeuronActor actor = instance.GetActor();

        if (actor != null)
        {
            line += string.Format("Data version: {0}.{1}.{2}.{3}\n", actor.version.Major, actor.version.Minor, actor.version.Revision, actor.version.BuildNumb);
            line += string.Format("Actor name: {0}\n", actor.name);
            line += string.Format("Actor index: {0}\n", actor.index);
            line += string.Format("With displacement: {0}\n", actor.withDisplacement);
            line += string.Format("With reference: {0}\n", actor.withReference);
            line += string.Format("Number of connections: {0}\n", NeuronConnection.numOfSources);
            line += string.Format("Number of active actors: {0}\n", actor.owner.numOfActiveActors);
            line += string.Format("Number of suspended actors: {0}\n", actor.owner.numOfSuspendedActors);
        }
        return(line);
    }
Esempio n. 2
0
    private string GenerateNeuronMasterInfo(int instanceIndex)
    {
        if (instanceIndex >= numOfInstances)
        {
            return(string.Empty);
        }

        NeuronAnimatorInstance instance = GetInstances()[instanceIndex];

        if (instance == null)
        {
            return(string.Empty);
        }

        string      line  = string.Empty;
        NeuronActor actor = instance.GetActor();

        if (actor != null)
        {
            line += string.Format("Data version: {0}.{1}.{2}.{3}\n", actor.version.Major, actor.version.Minor, actor.version.Revision, actor.version.BuildNumb);
            line += string.Format("Actor name: {0}\n", actor.name);
            line += string.Format("Actor index: {0}\n", actor.index);
            line += string.Format("With displacement: {0}\n", actor.withDisplacement);
            line += string.Format("With reference: {0}\n", actor.withReference);
            line += string.Format("Data frequency: {0}\n", actor.frequency);

            string temp = string.Empty;
            if (actor.combinationMode == NeuronDataReaderWraper.SensorCombinationModes.SC_ArmOnly)
            {
                temp = "arm only";
            }
            else if (actor.combinationMode == NeuronDataReaderWraper.SensorCombinationModes.SC_UpperBody)
            {
                temp = "upper body";
            }
            else if (actor.combinationMode == NeuronDataReaderWraper.SensorCombinationModes.SC_FullBody)
            {
                temp = "full body";
            }

            line += string.Format("Combination mode: {0}\n", temp);
            line += string.Format("Number of connections: {0}\n", NeuronConnection.numOfSources);
            line += string.Format("Number of active actors: {0}\n", actor.owner.numOfActiveActors);
            line += string.Format("Number of suspended actors: {0}\n", actor.owner.numOfSuspendedActors);
        }
        return(line);
    }
 void KillInstance(NeuronAnimatorInstance instance)
 {
     instances.Remove(instance.GetActor());
     GameObject.Destroy(instance.gameObject);
 }
	void KillInstance( NeuronAnimatorInstance instance )
	{
		instances.Remove( instance.GetActor() );
		GameObject.Destroy( instance.gameObject );
	}