Ejemplo n.º 1
0
 private void AddEvent(PropertyType propertyType, List <float> timeTbl, StringGridRow row)
 {
     for (int i = 0; i < row.Strings.Length; i++)
     {
         if ((i != 0) && !row.IsEmptyCell(i))
         {
             AnimationEvent event2 = new AnimationEvent();
             if (propertyType == PropertyType.Texture)
             {
                 string str;
                 if (!row.TryParseCell <string>(i, out str))
                 {
                     continue;
                 }
                 event2.set_functionName("ChangePattern");
                 event2.set_stringParameter(str);
                 event2.set_time(timeTbl[i - 1]);
             }
             if (Application.get_isPlaying())
             {
                 this.Clip.AddEvent(event2);
             }
         }
     }
 }
    private void Start()
    {
        //IL_0021: Unknown result type (might be due to invalid IL or missing references)
        //IL_0026: Expected O, but got Unknown
        //IL_004d: Unknown result type (might be due to invalid IL or missing references)
        cameraAnim.GetComponent <AnimationEventProxy>().listener = this;
        int i = 0;

        for (int num = playerAnimTimings.Length; i < num; i++)
        {
            AnimationEvent val = new AnimationEvent();
            val.set_functionName("OnEventInt");
            val.set_intParameter(i);
            val.set_time(playerAnimTimings[i]);
            cameraAnim.get_clip().AddEvent(val);
        }
    }