Esempio n. 1
0
        internal static NwObject?CreateInternal(ICGameObject?gameObject)
        {
            if (gameObject == null)
            {
                return(null);
            }

            return(gameObject switch
            {
                CNWSArea area => new NwArea(area),
                CNWSAreaOfEffectObject areaOfEffect => new NwAreaOfEffect(areaOfEffect),
                CNWSCreature creature => new NwCreature(creature),
                CNWSDoor door => new NwDoor(door),
                CNWSEncounter encounter => new NwEncounter(encounter),
                CNWSItem item => new NwItem(item),
                CNWSPlaceable placeable => new NwPlaceable(placeable),
                CNWSSoundObject soundObject => new NwSound(soundObject),
                CNWSStore store => new NwStore(store),
                CNWSTrigger trigger => new NwTrigger(trigger),
                CNWSWaypoint waypoint => new NwWaypoint(waypoint),
                CNWSObject => CreateFromVirtualType(gameObject),
                CGameObject => CreateFromVirtualType(gameObject),
                CNWSModule => NwModule.Instance,
                _ => null,
            });
Esempio n. 2
0
 internal NwAreaOfEffect(CNWSAreaOfEffectObject areaOfEffectObject) : base(areaOfEffectObject)
 {
     AreaOfEffect = areaOfEffectObject;
 }