示例#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));
 }
示例#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
            }));
        }
示例#3
0
 public GameObject(string tag)
 {
     this.tag         = tag;
     behaviorHandler  = new BehaviorHandler();
     componentHandler = new ComponentHandler();
 }