Exemple #1
0
 public void RemovePlugin(MotionPlugin.TYPE type)
 {
     if (!System.Array.Exists(Plugins, x => x.Type == type))
     {
         Debug.Log("Plugin of type " + type.ToString() + " does not exist.");
     }
     else
     {
         ArrayExtensions.Remove(ref Plugins, System.Array.Find(Plugins, x => x.Type == type));
     }
 }
Exemple #2
0
    public void AddPlugin(MotionPlugin.TYPE type)
    {
        if (System.Array.Exists(Plugins, x => x.Type == type))
        {
            Debug.Log("Plugin of type " + type.ToString() + " already exists.");
        }
        else
        {
            switch (type)
            {
            case MotionPlugin.TYPE.Style:
                ArrayExtensions.Add(ref Plugins, new StylePlugin(this));
                break;

            case MotionPlugin.TYPE.Phase:
                ArrayExtensions.Add(ref Plugins, new PhasePlugin(this));
                break;
            }
        }
    }