Exemplo n.º 1
0
        public static BaseSkillEvent InstSkillEvent(BinaryReader br, SkillInfo info, BaseSkillEvent parent, int layer, int index)
        {
            SKILL_EVENT_TYPE eventType = (SKILL_EVENT_TYPE)br.ReadInt32();
            BaseSkillEvent   bse       = SkillUtils.InstanceEvent(eventType, info, parent, layer, index);

            bse.time       = br.ReadSingle();
            bse.times      = br.ReadInt32();
            bse.interval   = br.ReadSingle();
            bse.actionTime = br.ReadSingle();
            bse.key        = bse.GetKey();
#if UNITY_EDITOR
            bse.lastType = eventType;
#endif
            return(bse);
        }
Exemplo n.º 2
0
        public string GetKey()
        {
            string key   = string.Empty;
            int    index = 0;

            if (parent != null)
            {
                index = parent.childrenEvents.IndexOf(this);
                key   = string.Concat(parent.GetKey(), ",", index);
            }
            else
            {
                index = skillInfo.eventList.IndexOf(this);
                key   = string.Concat(index);
            }
            return(key);
        }