Beispiel #1
0
 public TestStaticObject(string texID, string tag) : base(texID, tag)
 {
     Transform.Resize(40, 40);
     SpriteRenderer.DrawArea = new Vector2(40, 40);
     ComponentHandler.AddComponent(new CollisionBox(this, 0, "myBox", true));
     Transform.Place(new Vector2(100, 100));
 }
Beispiel #2
0
        public TestObject(string texID, string tag) : base(texID, tag)
        {
            Transform.Resize(40, 40);
            SpriteRenderer.DrawArea = new Vector2(40, 40);
            BehaviorHandler.AddBehavior(new TestControls(0, RigidBody));
            ComponentHandler.AddComponent(new CollisionBox(this, 0, "myBox", false));

            ((CollisionHandler)ComponentHandler.GetComponent("collisionHandler")).myActions.Add(new CollisionActions("myBox", new List <string> {
                "myBox"
            }, new List <collisionAction> {
                CollisionBehaviors.UndoMinPen
            }));
        }
Beispiel #3
0
 public GameObject(string tag)
 {
     this.tag         = tag;
     behaviorHandler  = new BehaviorHandler();
     componentHandler = new ComponentHandler();
 }