Esempio n. 1
0
        public override void OnStart(GameObject go)
        {
            if (Object.op_Equality((Object)go, (Object)null))
            {
                return;
            }
            UnitVoice unitVoice = (UnitVoice)go.GetComponent <UnitVoice>();

            if (Object.op_Equality((Object)unitVoice, (Object)null))
            {
                unitVoice = (UnitVoice)go.AddComponent <UnitVoice>();
            }
            unitVoice.CharType       = this.CharType;
            unitVoice.CollaboType    = this.CollaboType;
            unitVoice.DirectCharName = this.DirectCharName;
            unitVoice.CueName        = this.CueName;
            unitVoice.PlayOnAwake    = false;
            string directName = (string)null;
            string sheetName  = (string)null;
            string cueName    = (string)null;

            unitVoice.GetDefaultCharName(ref directName, ref sheetName, ref cueName);
            unitVoice.SetCharName(directName, sheetName, cueName);
            unitVoice.SetupCueName();
            unitVoice.Play();
        }
Esempio n. 2
0
        public override void OnEnd(GameObject go)
        {
            base.OnEnd(go);
            UnitVoice component = (UnitVoice)go.GetComponent <UnitVoice>();

            if (!Object.op_Inequality((Object)component, (Object)null))
            {
                return;
            }
            Object.Destroy((Object)component);
        }