public void Clear() { this.treeA = null; this.treeB = null; this.name = CollisionPair.Name.Not_Initialized; this.pSubject = null; }
//---------------------------------------------------------------------- // Methods //---------------------------------------------------------------------- public void set(CollisionPair.Name colPairName, GameObject pTreeRootA, GameObject pTreeRootB) { Debug.Assert(pTreeRootA != null); Debug.Assert(pTreeRootB != null); this.pTreeA = pTreeRootA; this.pTreeB = pTreeRootB; this.name = colPairName; }
public CollisionPair() : base() { this.treeA = null; this.treeB = null; this.name = CollisionPair.Name.Not_Initialized; this.pSubject = new CollisionSubject(); Debug.Assert(this.pSubject != null); }
public void SetCollisionPair(CollisionPair.Name colPairName, GameObject pTreeA, GameObject pTreeB) { Debug.Assert(pTreeA != null); Debug.Assert(pTreeB != null); //Debug.Assert(this.poColSubject != null); this.name = colPairName; this.treeA = pTreeA; this.treeB = pTreeB; }
public CollisionPair(CollisionPair.Name colPairName, GameObject pTreeA, GameObject pTreeB) { Debug.Assert(pTreeA != null); Debug.Assert(pTreeB != null); this.name = colPairName; this.treeA = pTreeA; this.treeB = pTreeB; this.poColSubject = new CollisionSubjects(); Debug.Assert(this.poColSubject != null); }
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); }
// Factory method, create and add Collision Pair into actives public CollisionPair AddCollisionPair(CollisionPair.Name _name, GameObject _host, GameObject _visitor) { // get a new object CollisionPair ret = (CollisionPair)this.PullFromReserved(); // set values ret.set(_name, _host, _visitor); // add to the active list this.Add(ret); return(ret); }
public static CollisionPair Find(CollisionPair.Name name) { // ensure call Create() first CollisionPairMan pMan = CollisionPairMan.GetInstance(); Debug.Assert(pMan != null); pMan.poNodeForCompare.setName(name); CollisionPair pData = (CollisionPair)pMan.baseFind(pMan.poNodeForCompare); return(pData); }
public static CollisionPair Find(CollisionPair.Name name) { CollisionPairManager pInstance = CollisionPairManager.PrivGetInstance(); Debug.Assert(pInstance != null); // Compare functions only compares two Nodes // So: Use the Compare Node - as a reference // use in the Compare() function pInstance.poNodeCompare.SetName(name); CollisionPair pData = (CollisionPair)pInstance.BaseFind(pInstance.poNodeCompare); return(pData); }
public static CollisionPair Add(CollisionPair.Name colPairName, GameObject pTreeRootA, GameObject pTreeRootB) { // ensure call Create() first CollisionPairMan pMan = CollisionPairMan.GetInstance(); Debug.Assert(pMan != null); CollisionPair pColPair = (CollisionPair)pMan.baseAdd(); Debug.Assert(pColPair != null); // initialize collision pair pColPair.set(colPairName, pTreeRootA, pTreeRootB); return(pColPair); }
public static CollisionPair Find(CollisionPair.Name name) { CollisionPairManager pMan = CollisionPairManager.pActiveMan; Debug.Assert(pMan != null); // Compare functions only compares two Nodes // So: Use the Compare Node - as a reference // use in the Compare() function CollisionPairManager.poNodeCompare.SetName(name); CollisionPair pData = (CollisionPair)pMan.BaseFind(CollisionPairManager.poNodeCompare); return(pData); }
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); }
public void SetName(CollisionPair.Name pairName) { this.name = pairName; }
public void setName(CollisionPair.Name name) { this.name = name; }
// called by manager factory method, to set value for newly pulled object public void set(CollisionPair.Name _name, GameObject host, GameObject visitor) { this.name = _name; this.treeHost = host; this.treeVisitor = visitor; }
public void Wash() { this.treeA = null; this.treeB = null; this.name = CollisionPair.Name.Not_Initialized; }
public void SetName(CollisionPair.Name inName) { this.name = inName; }