Пример #1
0
        /// <summary>
        /// called when gamecharacter collides with a platformobject.
        /// </summary>
        /// <param name="gstate"></param>
        /// <param name="gamechar"></param>
        /// <param name="otherobject"></param>
        /// <returns>false to continue default processing. true to return immediately without default processing.</returns>
        public override bool Collide(BCBlockGameState gstate, GameCharacter gamechar, PlatformObject otherobject)
        {
            //kill the other object, and leave us unaffected.
            //but- only for types deriving from PlatformEnemy

            if(otherobject is PlatformEnemy)
            {
                otherobject.Kill();

            return true;
              }
                return false; //default processing...
        }