Beispiel #1
0
        public StateDef(Type stateType)
        {
            if (!StateIndexTable.IsValid(stateType))
            {
                throw new ArgumentException(nameof(stateType));
            }

            this.stateType  = stateType;
            this.stateName  = stateType.AssemblyQualifiedName;
            this.stateIndex = -1;
        }
Beispiel #2
0
        // Token: 0x0600033C RID: 828 RVA: 0x0000D5E0 File Offset: 0x0000B7E0
        public static EntityState Instantiate(short stateTypeIndex)
        {
            Type type = StateIndexTable.IndexToType(stateTypeIndex);

            if (type != null)
            {
                return(Activator.CreateInstance(type) as EntityState);
            }
            Debug.LogFormat("Bad stateTypeIndex {0}", new object[]
            {
                stateTypeIndex
            });
            return(null);
        }
 public SerializableEntityStateType(Int16 stateIndex)
 {
     this._typeName = "";
     this.stateType = StateIndexTable.LookupStateDef(stateIndex).stateType;
 }