Пример #1
0
    protected override void PerformAction(float timeStep)
    {
        base.PerformAction(timeStep);

        /*if( !obstacleCreated )
         * {
         *      if( stageComponent != null )
         *      {
         *              obstacleComponent = stageComponent.CreateEventObstacle( obstacleModel, obstaclePosition, eventID );
         *              obstacleCreated = (obstacleComponent != null);
         *      }
         * }*/
        if (obstacleComponent != null)
        {
            /*halmeida - the moment in which an obstacle is destroyed is different from the moment
             * in which the obstacle finishes its disappearing animation.*/
            if (!obstacleDestroyed)
            {
                obstacleDestroyed = obstacleComponent.IsDestroyed();
            }
            if (!obstacleOver)
            {
                obstacleOver = obstacleComponent.IsOver();
            }
        }
    }