public static CollisionPair Add(CollisionPairName name, GameObject gameObject1, GameObject gameObject2) { CollisionPairManager cpMan = CollisionPairManager.GetInstance(); CollisionPair collisionPair = (CollisionPair)cpMan.BaseAdd(); Debug.Assert(collisionPair != null); collisionPair.Set(name, gameObject1, gameObject2); return(collisionPair); }
public static CollisionPair Add(CollisionPair.Name colPairName, GameObject treeA, GameObject treeB) { CollisionPairManager pMan = CollisionPairManager.PrivGetInstance(); Debug.Assert(pMan != null); CollisionPair pPair = (CollisionPair)pMan.BaseAdd(); Debug.Assert(pPair != null); pPair.SetCollisionPair(colPairName, treeA, treeB); return(pPair); }
public static CollisionPair Add(CollisionPair.Name colpairName, GameObject treeRootA, GameObject treeRootB) { // Get the instance CollisionPairManager pInstance = CollisionPairManager.PrivGetInstance(); Debug.Assert(pInstance != null); // Go to Man, get a node from reserve, add to active, return it CollisionPair pColPair = (CollisionPair)pInstance.BaseAdd(); Debug.Assert(pColPair != null); // Initialize Image pColPair.Set(colpairName, treeRootA, treeRootB); return(pColPair); }