internal static GameObject FromMapObject( MapObject mapObject, AssetStore assetStore, GameObjectCollection gameObjects, HeightMap heightMap, bool useRotationAnchorOffset = true, in float?overwriteAngle = 0.0f,
public GameObject(ObjectDefinition objectDefinition, ContentManager contentManager, Player owner, GameObjectCollection parent) { Definition = objectDefinition; Context = contentManager.IniDataContext; Owner = owner; Parent = parent; SetLocomotor(); Transform = Transform.CreateIdentity(); var drawModules = new List <DrawModule>(); foreach (var drawData in objectDefinition.Draws) { var drawModule = AddDisposable(drawData.CreateDrawModule(contentManager)); if (drawModule != null) { // TODO: This will never be null once we've implemented all the draw modules. drawModules.Add(drawModule); } } DrawModules = drawModules; Collider = Collider.Create(objectDefinition, Transform); ModelConditionStates = drawModules .SelectMany(x => x.ModelConditionStates) .Distinct(new BitArrayEqualityComparer <ModelConditionFlag>()) .OrderBy(x => x.NumBitsSet) .ToList(); SetModelConditionFlags(new BitArray <ModelConditionFlag>()); IsSelectable = Definition.KindOf?.Get(ObjectKinds.Selectable) ?? false; }
internal static GameObject FromMapObject( MapObject mapObject, AssetStore assetStore, GameObjectCollection gameObjects, HeightMap heightMap, in float?overwriteAngle = 0.0f,
internal static GameObject FromMapObject( MapObject mapObject, IReadOnlyList <Team> teams, AssetStore assetStore, GameObjectCollection parent, in Vector3 position)