public Actions(Entity source) : this() { id = source.ID; NewPosition = source.ID.Position; #if STATE_ADV newAppearances = source.Appearances?.Duplicate(); #endif }
public void AddOrReplace(EntityAppearance app) { if (newAppearances == null) { newAppearances = new EntityAppearanceCollection(); } newAppearances.AddOrReplace(app); }
public Entity(EntityID id, Vec3 velocity, EntityLogic dstate, byte[] state #if STATE_ADV , EntityAppearanceCollection appearance = null #endif ) : this(id, velocity, dstate, state, #if STATE_ADV appearance, null, #endif null) { }
public Entity(EntityID id, Vec3 velocity, EntityLogic state #if STATE_ADV , EntityAppearanceCollection appearance = null #endif ) : this(id, velocity, state, Helper.SerializeToArray(state), #if STATE_ADV appearance, null, #endif null) { }
public void Instantiate(Vec3 targetLocation, string assemblyName, string logicName, object[] constructorParameters #if STATE_ADV , EntityAppearanceCollection appearances #endif ) { Instantiate(targetLocation, new DynamicCSLogic(assemblyName, logicName, constructorParameters) #if STATE_ADV , appearances #endif ); }
public void Instantiate(Vec3 targetLocation, EntityLogic logic #if STATE_ADV , EntityAppearanceCollection appearances #endif ) { instantiations.Add(new Instantiation() { #if STATE_ADV appearances = appearances, #endif logic = logic, targetLocation = targetLocation }); }
public Entity(EntityID id, Vec3 velocity, EntityLogic dstate, byte[] state #if STATE_ADV , EntityAppearanceCollection appearance, EntityContact[] contacts #endif , EntityMessage[] messages) //: this() { //if (!Simulation.FullSimulationSpace.Contains(id.Position)) // throw new IntegrityViolation("New entity location is located outside simulation space: "+id+", "+Simulation.FullSimulationSpace); ID = id; Velocity = velocity; SerialLogicState = state ?? Helper.SerializeToArray(dstate); transientDeserializedLogic = dstate; #if STATE_ADV Appearances = appearance; Contacts = contacts; #endif InboundMessages = messages; }
public EntityContact(EntityID id, EntityAppearanceCollection appearances, Vec3 velocity) { ID = id; Appearances = appearances; Velocity = velocity; }