예제 #1
0
 public CollisionComponent(GameObject parent, bool isSolid = false) : base()
 {
     this.physics = parent.GetComponent <PhysicsComponent>(); this.hitbox = parent.GetComponent <Hitbox>(); this.isSolid = isSolid; gameObject = parent; collidingObjects = new List <GameObject>();
 }                                                                                                                                                                                                                                                                            //This constructor should get relevant component references from its parent
예제 #2
0
 public CollisionComponent(PhysicsComponent physics, Hitbox hitbox) : base()
 {
     this.physics = physics; this.isSolid = true; this.hitbox = hitbox; collidingObjects = new List <GameObject>();
 }