public virtual void OnDestroy(SceneInstance caller) { foreach (Instance inst in caller.Instances) { inst.BaseReference.OnDestroy(inst, caller); } }
public virtual void Step(SceneInstance caller) { foreach (Instance inst in caller.Instances) { inst.BaseReference.Step(inst, caller); } }
public virtual void OnCreate(SceneInstance caller) { foreach (Instance inst in caller.Instances) { if (inst.IsActivated) { inst.BaseReference.OnCreate(inst, caller); } } }
public virtual void Step(Instance caller, SceneInstance scene) { //constraints if (caller.ImageAngle >= 360) { caller.ImageAngle -= 360; } if (caller.ImageAngle < 0) { caller.ImageAngle += 360; } }
public virtual void Step(SceneInstance caller) { if (caller.PhysicsWorld != null && caller.UsesPhysics) { caller.PhysicsWorld.UpdateCycle(); } foreach (Instance inst in caller.Instances) { if (inst.IsActivated) { inst.BaseReference.Step(inst, caller); } } }
public SceneInstance CreateInstance() { SceneInstance instance = new SceneInstance(); instance.BaseReference = this; instance.ReferenceType = ReferenceType; instance.UsesPhysics = UsesPhysics; instance._initPhysics(); foreach (var obj in GameObjects) { Instance inst = obj.GameObject.CreateInstance(out Guid guid); inst.Position = new Coord(obj.Position.X, obj.Position.Y); instance.Instances.Add(inst); inst.BaseReference.OnCreate(inst, instance); } return(instance); }
public SceneInstance CreateInstance() { SceneInstance instance = new SceneInstance(); instance.BaseReference = this; instance.Instances = new InstanceCollection(); instance.ReferenceType = ReferenceType; instance.ViewPosition = new Coord(0, 0); foreach (var obj in GameObjects) { Instance inst = obj.GameObject.CreateInstance(out Guid guid); inst.Position = new Coord(obj.Position.X, obj.Position.Y); instance.Instances.Add(inst); inst.BaseReference.OnCreate(inst, instance); } return(instance); }
public virtual void OnDestroy(Instance caller, SceneInstance scene) { }
public virtual void OnCreate(Instance caller, SceneInstance scene) { }
public virtual void OnCreate(SceneInstance caller) { }