コード例 #1
0
ファイル: LightMgr.cs プロジェクト: mmandel/8Nights2
 void OnLightJamsLightChanged(object sender, LightJamsMgr.LJEventArgs e)
 {
     if (OnLightChanged != null)
     {
         EightNightsMgr.GroupID gID = EightNightsMgr.GroupID.Shamash;
         EightNightsMgr.LightID lID = EightNightsMgr.LightID.Light1;
        if (FindLight(e.Channel, e.IsPar64 ? LightTypes.LightJams_Par64 : LightTypes.LightJams, ref gID, ref lID))
         {
           LightGroupConfig config = FindGroupConfig(gID);
           OnLightChanged(this, new LightEventArgs(gID, lID, e.IsPar64 ? LightTypes.LightJams_Par64 : LightTypes.LightJams,  new LightData(e.IsPar64 ? e.EventColor : config.DefaultColor, e.Intensity)));
         }
     }
 }
コード例 #2
0
ファイル: EightNightsMgr.cs プロジェクト: mmandel/8Nights2
 void OnLightJamsLightChanged(object sender, LightJamsMgr.LJEventArgs e)
 {
     if (OnLightChanged != null)
       {
      GroupID gID = GroupID.RiftGroup1;
      LightID lID = LightID.Light1;
      if (FindLight(e.Channel, LightTypes.LightJams, ref gID, ref lID))
      {
         LightGroupConfig config = FindGroupConfig(gID);
         OnLightChanged(this, new LightEventArgs(gID, lID, LightTypes.LightJams, new LightData(config.DefaultColor, e.Intensity)));
      }
       }
 }
コード例 #3
0
ファイル: LightJamsMgr.cs プロジェクト: mmandel/8Nights2
    // Use this for initialization
    void Awake()
    {
        Instance = this;

          //make sure the OSCMessenger exists
          if (gameObject.GetComponent<OSCMessenger>() == null)
         gameObject.AddComponent<OSCMessenger>();
    }