コード例 #1
0
ファイル: collider.cs プロジェクト: aaronrcooper/ACFramework
 public void build(cBiota pbiota)
 {
     removeAll();             //Clear it out.
     for (int i = 0; i < pbiota.Size; i++)
     {
         for (int j = i + 1; j < pbiota.Size; j++)
         {
             smartAdd(pbiota.GetAt(i), pbiota.GetAt(j));
         }
     }
 }
コード例 #2
0
        public cGame(cBiota pbiota)
        {
            _pcollider   = new cCollider();
            _pcontroller = Framework.Keydev;
            _pbiota      = pbiota;
            _pbiota.setGame(this);
            _pfocus         = new cCritter();
            _border         = new cRealBox3();
            _pskybox        = new cSpriteTextureBox();
            _plightingmodel = new cLightingModel();
            _cursorpos      = new cVector3();

            //Deleting the _pbiota killed off your _pplayer, so you need to get a new one.
            if (_pbiota.Size > 0) // use the first member of pbiota if there is one.
            {
                _pplayer = _pbiota.GetAt(0);
            }
            else //otherwise make a dummy.
            {
                _pplayer = new cCritter();
                cCritter pdummyplayer = new cCritter();
                setPlayer(pdummyplayer);
            }
        }