/* If there is
         *  a sprite at index, delete it and put in psprite new.  Else do nothing. */

        public override cSprite copy()
        {
            cSpriteComposite sc = new cSpriteComposite();

            sc.copy(this);
            return(sc);
        }
示例#2
0
        public override void copy(cSprite psprite)
        {
            base.copy(psprite);
            _childspriteptr.RemoveAll();
            if (!psprite.IsKindOf("cSpriteComposite"))
                return; //You're done if psprite isn't a cSpriteComposite.
            cSpriteComposite pspritecomposite = (cSpriteComposite)psprite; /* I know it is a
			cSpriteComposite at this point, but I need to do a cast, so the compiler will 
			let me access it's cSpriteComposite member _childspriteptr. */

            foreach (cSprite s in pspritecomposite._childspriteptr)
                add(s);

            NewGeometryFlag = true;
        }
 public cCritterInvisibleWall(cVector3 enda, cVector3 endb, float thickness = THICKNESS,
                              float height = WALLPRISMDZ, cGame pownergame = null) : base(enda, endb, thickness,
                                                                                          height, pownergame)
 {
     Sprite = new cSpriteComposite();
 }